I've implemented a sliding menu nav using SWRevealViewController (which works great). I was able to easily make it so i could swipe right to see the menu by adding this line to my
[self.view addGestureRecognizer:self.revealViewController.panGestureRecognizer];
The menu nav would then show up on the left side of the screen (my main view controller would move to the right). However I am unable to swipe the screen back -- I am forced to tap on the main screen to have it move back (hiding the menu nav in the process). Is there an easy way to implement this?
Related
My client wanted a navigation drawer (hamburger menu) on the top-left corner of the navigation bar (yes, they know it's not adherent to the iOS design principles, but they want regardless).
I have the hamburger setup as a custom icon with a segue that pushes to the menu viewcontroller (MenuViewController)
The problem was the client said it slid out from the right, and closes to the left (which is standard with Apple). They want to reverse it.
So I need to reverse both animations (slide in, and slide out)
To do the first part, I followed this, which worked perfectly:
iOS Segue - Left to Right -
So now after applying that custom code it slides in beautifully from the left.
But now I want the drawer to slide back to the left, but of course by default it goes to the right when I click the < navigation arrow on the top of MenuViewController.
Any ideas how I could go about reversing this? I was thinking custom unwind segue, but I don't actually HAVE a segue on the storyboard because this is just a back button being generated as a result of pushing the MenuViewController to the navigation stack.
My guess is to create some sort of override for unwind on the MenuViewController.swift file, but I haven't had success so far.
Could anyone point me in the right direction?
Thanks!
I am using SWRevealViewController library for making side bar menu in IOS from the link http://www.appcoda.com/ios-programming-sidebar-navigation-menu/
The problem is that when the sidebar menu is opened I don't want the user to access the main view ( it is the viewController in which I have the navigation button and the pan gesture for getting the slider out are present ) so that when side bar is opened and user is touching right of the screen on the main view any button or any tableView on the main view should not be accessible. Can anyone tell me how to do this in this library
I have a UIViewController that I display full screen, then when the user touches a button I present another view controller like so:
[self.navigationController pushViewController:loadSaveViewController animated:YES];
I like the animation that happens when I transition TO the view controller i.e. the main view shifts down and slides off to the left and the new view controller is displayed with the nav bar at the top.
HOWEVER, when I go back using the button at the top of the nav bar the screen does the opposite. The main screen appears, but with a nav bar at the top for a short time then the main screen shifts up.
How do I stop the main screen from doing the animation? When the user returns to the main screen, I do not want them to see the nav bar and the shift up, I just want the main screen to appear, or slide in.
Thanks for the help.
In iOS 7, there are new classes that will allow you to control every aspect of animation. This website is very useful ios 7 transitioning
I wonder if this is possible. The design for this app I am working on is as below:
Two sliding views sit one on top of the other. The bottom view is a 'Settings' view. The top view is a tab bar view. We are using ECSlidingViewController for the sliding.
When the app is opened for the first time, the tab bar view shows with first tab selected.
When they tap on the hamburger menu or slide right, the bottom, settings view slides into view.
When they tap on an item in the settings view, like the About item, the corresponding view should be displayed inside the top tab bar view with none of the tabs shown as selected.
I think I am going to have to convince my team to not display the settings items inside of the tab bar, it seems just too twisted. But just wanted to know if anyone else has done anything like this and if it is possible to do it without introducing too much complication in the code.
I've done something with the same design with a menu that slides from the left and over the tab bars. I ended up putting a View Controller on top of everything else
Something like
[self presentViewController:AboutViewController Animated:YES];
Just make sure that you either put that view controller in a UINavigationController or something with a dismissViewController for users to return to your main page.
I develop an app for iOS 5+ with storyboards (and ARC). I have a view controller with no status bar, a top navigation bar, a map in the middle, and a bottom toolbar with a button at the bottom right. I've linked the button to a modal VC via a page curl segue.
My problem is I would like the page curl effect to apply only to the map (just as iOS 5's map), or at least not to the bottom toolbar, so I can present/dismiss the modal VC with the same button of the bottom bar (I want it to be persistent). Right now, I can present it by pressing the button, but the toolbar goes up halfway of the screen with the whole view. I can dismiss it by touching the upper-left side of the screen but it's not really user friendly.
I can add the toolbar to the modal view controller, but that doesn't look nice...
Any ideas ?
Thanks.
A quick thought for you as I stumbled on this while looking for something else, but I would consider:
Putting the top section of the screen within a container view, then presenting the modal view from that. It will leave the bottom (toolbar area) clear.
Alternatively, instead of using the standard segue you could implement your own page curl, and/or using some of the open source projects that demonstrate how to do this.
You probably solved this long ago but perhaps this helps someone :)