I have used ECSLidingViewController for navigation which works fine in my project. The problem i am facing is, i have four buttons on the main screen. When i navigate to other screens using these buttons the sliding menu dosent work on that screen.
Is there a different way to navigate using button click in ECSlidingViewController.
Thanx
Sliding menu button will only work in root view controller, but if you pushes your view and navigate to other view, then navigation button will work for back action but PAN gesture will continue to work.
Related
I have been trying to properly setup a navigation bar in one of my View Controllers for an hour now and have not found any working solutions.
I control-clicked on a button on my app's initial view controller(1st VC) and dragged to another view controller(2nd VC) and selected "modal" as the action segue.
I then added a navigation bar item to my 2nd view controller.
When I run my app on my iPhone, I can tap on the button on my app's initial screen and it will take me to my 2nd VC, and the 2nd VC does display the navigation bar, but the navigation bar does not have the default iOS 7 back arrow to let me go back to the app's initial VC.
I was under the impression that this could be setup exactly like I did above and that the back button functionality would be included by default.
Am I completely lost? Do I need to further customize navigation bar programmatically or with a tick box in the attributes inspector? Is "modal" the wrong action segue option?
I basically just want to have navigation bars at the top of a couple of my VC's so that the user can easily get back to the app's initial screen.
Thanks for the help.
Since you are presenting your second screen (2nd VC) as MODAL from your first screen (1st VC), you will not see the back arrow button on navigation bar. Your understanding about back button works for Navigation view controllers (push segue). For MODAL you need to put a cancel button on second VC's Nav bar and put a dismiss action for that.
Okay, so I want to be able to have a TabBar Controller with two Tabs (like the template in Xcode), but inside the Second tab, I want to have a button that takes the view to a Third View Controller. I want the Third View Controller to have a back button to the Second Tab, I don't want the Third View to retain the TabBar, but when I go back to the Second Tab I want the TabBar to return.
So this is what I actually did, and it doesn't work. I put a button in 2nd view and 3rd view, and I control clicked and dragged to the respective views, and clicked modal. Everything works, except when I go back to the 2nd view I lose the tab bar.
Pictures of what I am talking about:
Screen Shot of Xcode:
Screen Shot of iOS on 2nd view:
Screen Shot of after I click button to go to third view:
Screen Shot of after I Click button to go back to second view. ( lose tab bar !)
http://s13.postimage.org/78gqghflj/Screen_Shot_2012_07_09_at_2_03_41_PM.png
http://s16.postimage.org/gdwus4w6t/i_OS_Simulator_Screen_shot_Jul_9_2012_2_02_50_PM.png
http://s10.postimage.org/5uq3ste7d/i_OS_Simulator_Screen_shot_Jul_9_2012_2_02_57_PM.png
http://s8.postimage.org/gpmsx959x/i_OS_Simulator_Screen_shot_Jul_9_2012_2_03_54_PM.png
You don't need a separate modal Segue back to the Second View Controller, you can just dismiss the modal view controller when "Back to Second View" is clicked
[self dismissModalViewControllerAnimated:YES];
I have a tab bar with five tabs.
In one tab I have a mapview. I have an info button in the bottom right hand corner of the map. When a user clicks the info button, I want the mapview to flip to a view that has information about the mapview. I'd like a back button in the nav bar to flip back.
How can I do that?
I've managed to create a view controller and make a modal segue, but it doesn't keep the tab bar with it. Worse still, I created a back button on the flipside-viewcontroller with a modal segue back to the mapviewcontroller, and when you go back, the tabbar is gone!
I'm using a storyboard, and most tutorials I find use nibs and xibs. The more control-clicking I can do through the storyboard-IB and the less code the better. Any help is appreciated!
Once you have created in the backButton in the MapInformation view in storyboard, you can add the following to your MapInformation.h/m:
MapInformation.h:
-(IBAction)backButton:(id)sender;
MapInformation.m:
-(IBAction)backButton:(id)sender
{
[self.presentingViewController dismissModalViewControllerAnimated:YES];
}
After that, make sure to connect your IBAction in your storyboard(control-clicking).
I have a root view controller with just a simple navigation button that loads a questionview. When I use pushViewController a back button appears. Instead I want a custom button in the top right of the uinavigationcontroller and I want to remove the back button after the page transition.
how can i achieve this..
Take a look at UINavigationItem. You can accomplish both your goals by properly configuring your view controller's navigation item. Use the -setHidesBackButton:animated: to hide the back button, and the -setRightBarButtonItem:animated: to add your custom button on the right side of the navigation bar.
I have a simple tableview that navigates to a detailed view with a navigation controller. In the detailed view I need to create a button which when pressed isolates all other buttons displayed on the screen including the navigation controller back button. I know how to get the invisible button to cover most of buttons the screen but I can't get it to cover the navigation controller back button as this has been created in the parent view. How do I pop it over the top of the navigation controller from the detail view?
You can insert the button as a direct subview of the key window.
[[UIApplication sharedApplication].keyWindow addSubview:theButton];
(why not use an UIAlertView or UIActionSheet?)