It appears that side-swipe menus are becoming a more common interface element as more information gets crammed into each iPhone app. Facebook has included it in their latest version and the new Gmail app appears to include it as well. I was wondering if anybody had thoughts on the most efficient way of developing something like this as it's becoming a more common interface element. While I have my own thoughts on how to build this, I'm curious to hear what other people think.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- State preservation and restoration strategies with
- “Zero out” sensitive String data in Swift
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- xcode 4 garbage collection removed?
- Xcode: Is there a way to change line spacing (UI L
- Unable to process app at this time due to a genera
- Swift - hide pickerView after value selected
I recently came across this, didn't actually look at the code or test the control, but looks like it may be a very decent starting point.
jtrevealsidebar
Edit: The reader should also take a look at the other answers :)
A excellent guide to how develop your own Slide-Out-Navigation in Swift and Objective-C.
Objective-C
Swift
The key idea that you have to set self.navigationController.view's frame or center. There is two event that you have to handle. (1) barButtonItem press. (2) pan gesture because of swiping.
You can send view controller to the background like this:
Check out MMDrawerController:
MMDrawerController
We couldn't find a library that we liked, so we just rolled our own.
the view in the right could be inside a subclass of UIScrollView. In this subclass you can override
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
to return YES only if the user touched the subview. This way you can place your transparent UIScrollView over any other view and pass through any touch event that takes place outside the subview; and you get scroll stuff for free.For example:
or:
this is exactly the clone of the facebook sidebar : GHSidebarNav library
very easy to use. instruction are in