I'd like to implement my sliding menu in a way that pressing the Menu button will show my menu and pressing Menu again would hide it. But I can't understand how to do it with ECSlidingViewController. Will appreciate any help.
相关问题
- 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
- Get the NSRange for the visible text after scroll
相关文章
- 现在使用swift开发ios应用好还是swift?
- UITableView dragging distance with UIRefreshContro
- TCC __TCCAccessRequest_block_invoke
- Where does a host app handle NSExtensionContext#co
- Swift - hide pickerView after value selected
- How do you detect key up / key down events from a
- didBeginContact:(SKPhysicsContact *)contact not in
- Attempt to present UIAlertController on View Contr
ECSlidingViewController has methods for this:
anchorTopViewToRightAnimated:
,anchorTopViewToLeftAnimated:
andresetTopViewAnimated:
.Example in your top view controller:
ECSlidingViewController provides a category for UIViewController adding this
slidingViewController
property.You may also want to use ECSlidingViewController's
currentTopViewPosition
to determine if your button should show your menu or hide it in the current context.I have came up with this question and above answer helps me to resolve it. But I just need to add more detailed answer with code example, so others might get benefit from this if they faced such a problem.
+1 for the question and accepted answer
Thanks.
According to "ECSlidingViewController sample project" you need to put these 4 lines in ViewWillAppear of FirstTopController(e.g TransitionViewController):
These 4 lines are being used in delegate method of tableview. It might be possible you're not using tableview so these 4 lines are not calling.
Best of Luck..