Closed mrodalgaard closed 10 years ago
Why would you prefer a new method instead of calling -removeFromParentViewController
?
One of the issues is removing the control before the animation completes, breaking VC containment. I'm going to have to think on this a bit. Seems there should be another solution.
Wouldn't it seem like magic having the user call [sidebar removeFromParentViewController]
before the user segues? With a dedicated call, you know that the user is about to push a new viewController, and can thereby safely remove the sidebar from navigationViewController immediately. But I guess it's a matter of opinion.
You could also wait with the segue until the animation is done, though it would probably feel slow - or maybe it would work if you set sidebar's animation to false
?
I have used below code but it is not working for me.
can't navigate to another view controller.
Please help me asap.
As a solution to the subject discussed in Issue #8, where RNFrostedSidebar is used to push a new viewController in a navigationController.
Show the sidebar on top of the navigationController:
In
didTapItemAtIndex
calldismissInNavigation
before sergue to correctly remove the sidebar from the parentViewController before pushing the new viewController, and thereby keep the navigationBar.You could also just call
[self removeFromParentViewController]
every time indismissAnimated:(BOOL)animated
, but I think a dedicated call is more suited.I think a lot of people is using your control with a navigationController. A test case of this scenario would be nice in your demo project, but that is up to you.