iPhone dev: Creating sliding drawers like Path and Facebook apps - iphone

The new Facebook app seem to have done away with the grid-icon layout, with a more interesting custom navigation layout where the bottom-most view shows all the options (like Profile, News Feed, Messages etc for Facebook) and clicking on one of them brings another view sliding over the top. You can press the 3-lines button to then expose the bottom-view again, but the current view is partially visible. The Path app also recently updated to match this scheme.
What's the best way to recreate this? I've searched for any open-source options but haven't found them. Three20 doesn't seem to support this either.

Another option that I wrote: ECSlidingViewController
It has support for orientation changes like Facebook and sliding to the left like Path.
Video demo: http://vimeo.com/35959384
Code: https://github.com/edgecase/ECSlidingViewController

Try These from Cocoa Controls:
JTRevealSidebar http://cocoacontrols.com/platforms/ios/controls/jtrevealsidebar
clcascade http://cocoacontrols.com/platforms/ios/controls/clcascade
StackScrollView http://cocoacontrols.com/platforms/ios/controls/stackscrollview
Many more on the same site like:
http://cocoacontrols.com/platforms/ios/controls/mfslidingnavigationcontroller
http://cocoacontrols.com/platforms/ios/controls/psstackedview

I found a really nice project on github:
https://github.com/devindoty/DDMenuController

Everything I've seen on the internet and those recommended by Yosi Taguri are all way too complicated. Drawers can be achieved by a very simple category to UINavigationController with no graphics asset whatsoever and no class extension needed, and backwards compatible with iOS 3.0!
Take a look a this:
http://code.google.com/p/drawer-navigation-controller/
Here is a video http://www.youtube.com/watch?v=5T-1-_pFbG0

This project (not mentioned above) looks like the most mature and polished to me: https://github.com/gotosleep/JASidePanels
Also, seems to still be active.
Edit: I have since transitioned to: https://github.com/mutualmobile/MMDrawerController which IMO is an almost perfect implementation.

Check my answer here - SplitView like Facebook app on iPhone - which contains a list of open-source codes.

if anyone's wondering which one to choose among JTReveal and DDMenu, I'd suggest DDMenucontroller over JTRevealSidebar (haven't used the other options listed by #Yosi). Its a lot simpler, lighter and works exactly the way the Path app works (and it is easier to modify to suit your requirements). Havent seen the issue of black background mentioned by #Henning

My project FRLayeredNavigationController on GitHub goes in about the same direction.
(The spacing between the layers is easily configurable and it supports rotation of course).
Have a look at the demo videos/screenshots:
http://youtu.be/v_tXD_mL05E
http://youtu.be/q66HX2td_uc
https://github.com/weissi/FRLayeredNavigationController/raw/master/FRLayeredNavigationControllerScreenshot1.png
https://github.com/weissi/FRLayeredNavigationController/raw/master/FRLayeredNavigationControllerScreenshot2.png

Here's another one: PPSlideDrawer.
http://www.localwisdom.com/blog/2013/05/simple-sliding-drawer-implementation-for-ios/
I checked out #Ephraim's answer (http://code.google.com/p/drawer-navigation-controller/) because it seems pretty easy to work with. The problem, it seems, with drawer-navigation-controller is that the swiping animation does not follow the user's finger--it is automated. PPSlideDrawer aims to solve that. I'm about to try it out in my project and will post some updates.
Might be a dealbreaker for some that the following are still under "TODO:"
Implement auto open functionality.
Implement swipe from edge functionality(rather than just detect panning gesture).
Landscape support.

Here is one thats very easy to implement and use with storyboards. It has control for shrinking, show hide animations, and direction.
https://github.com/HelloMihai/HMSideDrawerDirectional

Related

What's the proper way to present an alert view like Xcode's build success alert on macOS? [duplicate]

I'm not sure of the correct name, but I am wondering how to create (in Objective-C) a transparent notification "window/panel", such as is shown when you change the volume intensity, or keyboard illumination, or display brightness. I want to put my own icon/text on it, for my own notification.
I don't know the words to Google for, so I'm asking here.
Thanks for any suggestions.
Matt Gemmell's RoundedFloatingPanel component on his sample code page may do just what you're looking for.
After looking into using the solutions provided by the other two given answers, I found that they would not work for my purposes. So, I wrote up my own library:
BHBezelNotification
Growl is a widely-used implementation of this. By default, it doesn't look exactly like the system overlays, though it is skinnable - you probably want the Bezel notification:
See the Growl Developer Documentation for more.

Springboard-like menu to select other views in storyboard

I use a storyboard and I want to make a springboard menu like that http://static5.businessinsider.com/image/4d657896cadcbbd948120000-590/this-is-what-badoos-iphone-app-looks-like-when-you-first-launch-it-just-one-of-many-ways-to-use-the-service-smartly-you-can-do-things-without-registering-lets-look-at-people-nearby.jpg with only one page and nine icons.
I found the library Three20 but it is complex and I have problems to import it to my project.
Any suggestion?
Just for the people who are looking for the answer (it's hidden in the comments below the question);
me:
What exactly is the purpose of this springboard? Does it have to be dynamic? Do people drag things around? Can you delete stuff on it? If the answer is no for all of the questions; just place a few buttons on an empty page.. If the answer is yes on some of the questions; it's just as easy to write one yourself as it is to understand some open source framework (three20 has long passed its expiration date i.m.o).
Ángel Carlos del Pozo Muela:
Not dragging things or deleting, only select icon to go to another
view. Any advice to do it using storyboard? Thanks a lot.
me:
I think dragging buttons onto your view in a grid-like manner, and
connecting the touch events to new views, should do the trick. Even in
storyboard.
I can confirm that the old version of the Badoo app actually used three20. ;-) So I guess you're stuck with implementing that, although I wouldn't add three20 to any new project.

Providing un-intrusive messages on an iPhone

This is kind of a silly question, but I cannot find the answer as I don't know the terms with which to search for it.
I am looking for a simple way of giving a 'status' message like 'Data updated' to the user without necessarily interrupting what he/she is doing (but have a option I guess in some instances to tab it an perform an action).
For example; some Apps give a rounded square semi-transparent with 'Lock screen/rotation' when an iPhone is rotated, I am look for something similar (or like the square box 'Build Complete in Xcode 4').
Is there an easy way of doing this?
Thanks a million in advance!
https://github.com/myell0w/MTStatusBarOverlay
MTStatusBarOverlay adds very subtle text to the phone's status bar. If you're looking for something a little more noticiable, try:
https://github.com/jdg/MBProgressHUD
As #kubi has pointed out, MTStatusBarOverlay is a good one, and I've passed Apple reviewer inspection with it. However I just found something that looks fraking awesome...
Tweetbot-Like Alert Panels (Blog), and the repository is MKInfoPanelDemo at Github.
Create a view that shows your message nicely, add it to the window, and start a UIView animation which makes it fade away. In the animation ended handler (delegate or block) remove the view.

Create springboard like main view

Is there some sample code, or an easy way, to implement an application with as its first view something like Springboard?
What I am looking for is just a view with basic icons which after a tab on an icon tells the view-controller to push the view associated with the selected icon.
This in itself is not that difficult off-course (just putting images on a view), but is there an easy way to implement all the extra functionality as well (as e.g. moving the icons around (start 'vibrating' when when you push hold them), multiple pages etc.). The Facebook App seems to have this. It is probably not worth my while to write it myself, but it would be nice if there is something 'out of the box' to give the App a bit more of an iPhone feel.
Thanks in advance!
Facebook uses the Three20 library for its UI. The specific view used for the SpringBoard-like interface is known as TTLauncherView.
This is not an endorsement (I have yet to really check this out, and I may be too entrenched in using Three20 at this point to even bother), but here is another project that implements the springboard functionality: myLauncher on Github
You can use UICollectionView to create this
Look at this example
https://github.com/tularovbeslan/Springboard

How to Create the Highlight/Note Popup Buttons from the iPhone Kindle

I am wondering how Amazon did the highlight/note popup buttons in the Kindle app. After reading about UIPasteboard, UIMenuController, UIResponder, and UIResponderStandardEditActions, I am able to turn on or off standard edit actions (i.e. copy, cut, paste, select, and selectAll). However I haven't found a way to add a custom action yet. I would really appreciate it if I could get a pointer.
Thanks in advance!
Chris
(source: sampletheweb.com)
Edited by balexandre (added image instead link)
It looks like Amazon implemented their own custom view that mimicked the appearance of UIMenuController. I believe they did this rather than use SPI because if you click and hold on the Highlight cell, the arrow does not highlight, when it does in the real UIMenuController.
I don’t think there is a public interface to these controls, you’d probably have to code them yourself. (Or maybe figure out the private API, but that’s a slippery slope.) I am not sure about that, though, maybe somebody will prove me wrong.
That's a good point about the arrow part of the Notes/Highlight popup menu not highlighting, so they must be implementing their own.
However they are also obviously using a UIWebView, because it's recognizing tap and hold and they can highlight the text, and you can't get touch events from a UIWebView, much less get the information about what's selected. So how are they doing that?
This would be very useful for us to be able to do as well.
Use DTMenuController http://www.drobnik.com/touch/2010/01/dr-touchs-parts-store/
Costs 100 EUR ^_^
Custom menu items can be added via the UIMenuController's menuItems property. See Apple's UIMenuController docs.
the javascript part can be managed with jQuery, that's a fair simple and powerful library. i'm using it for resizing and rearranging things in a webview and it works great :)