Questions tagged [uinavigationcontroller]

The UINavigationController class implements a specialized iOS view controller that manages the navigation of hierarchical content.

This class is not intended for subclassing. Instead, you use instances of it as-is in situations where you want your application’s user interface to reflect the hierarchical nature of your content. This navigation interface makes it possible to present your data efficiently and also makes it easier for the user to navigate that content.

The screens presented by a navigation interface typically mimic the hierarchical organization of your data. At each level of the hierarchy, you provide an appropriate screen (managed by a custom view controller) to display the content at that level.

Sample of use

References:

UINavigationController Class Reference

11391 questions
64
votes
12 answers

Navigation controller top layout guide not honored with custom transition

Short version: I am having a problem with auto layout top layout guide when used in conjunction with custom transition and UINavigationController in iOS7. Specifically, the constraint between the top layout guide and the text view is not being…
Rob
  • 415,655
  • 72
  • 787
  • 1,044
63
votes
9 answers

Pop 2 view controllers in Nav Controller in Swift

I have found many ways to pop back 2 UIViewControllers in UINavigationController using Objective-C, however when I try and switch that over to Swift it doesn't seem to be working. What would be the best approach to pop back to UIViewController? Any…
candidaMan
  • 791
  • 1
  • 7
  • 12
62
votes
11 answers

Is there a way to change the height of a UINavigationBar in Storyboard without using a UINavigationController?

I want to use a custom UINavigationBar in one of my views, which is not a part of any UINavigationController-hierarchy. When I drag a UINavigationBar into Storyboard, it shows like this: This bar is 44px, which would be enough if the status bar…
Sti
  • 8,275
  • 9
  • 62
  • 124
61
votes
11 answers

UINavigationBar multi-line title

Is there a straightforward way of overriding the titleView of the current navigation bar item in a navigation bar within a navigation controller? I've tried creating a new UIView and replacing the titleView property of topView with my own UIVIew…
60
votes
18 answers

How to change the UINavigationController back button name?

I have a UIViewController and I'm navigating from my first view controller to second view controller and I want to change the name of the button shown on the navigationcontroller for going back .... SecondViewController *secondController =…
Bulla
  • 924
  • 1
  • 7
  • 15
60
votes
6 answers

How to press "Back" button in UINavigationController programmatically

I have a UIViewController called FriendsViewController inside a UINavigationController. And a second UIViewController called FriendsDetailedViewController. When navigating from the first view controller to the second, I want to programmatically…
60
votes
8 answers

How to hide/show tab bar of a view with a navigation bar in iOS?

I have views with a navigation bar and a tab bar. What I would like to happen is to hide the tab bar on a certain view and show the tab bar again when the user changes views. I saw a snippet of code for hiding the tab…
dork
  • 4,396
  • 2
  • 28
  • 56
60
votes
3 answers

Getting the top most UIViewController

If I push view controllers and/or present modal view controllers on a UINavigationController, how can I find out what is the top most UIViewController? Or in my case, I want to know if a certain UITableViewController is the top most or not. I tried…
Senseful
  • 86,719
  • 67
  • 308
  • 465
60
votes
15 answers

Content pushed down in a UIPageViewController with UINavigationController

UPDATE 2 I've been running and testing my app in the iOS Simulator using a 4-inch device. If I run using a 3.5-inch device the label doesn't jump. In my .xib, under Simulated Metrics, I have it set as Retina 4-inch Full Screen. Any idea why I'm only…
djibouti33
  • 12,102
  • 9
  • 83
  • 116
58
votes
11 answers

Status bar and navigation bar issue in IOS7

I am migrating my application to iOS 7. For handing the status bar issue I have added this code if([[[UIDevice currentDevice] systemVersion] floatValue] >= 7.0f) { CGRect frame = self.navigationController.view.frame; …
Ganapathy
  • 4,594
  • 5
  • 23
  • 41
58
votes
4 answers

self.title sets navigationController and tabBarItem's title? Why?

I do this in a UIViewController for one of my tabs: self.title = @"Welcome"; However, it's overwriting whatever I have for the tabBarItem. I have tried: self.tabBarItem.title = @"Home"; and [self.tabBarItem initWithTitle:@"Home" image:[UIImage…
runmad
  • 14,846
  • 9
  • 99
  • 140
57
votes
8 answers

Selected UItableViewCell staying blue when selected

When I push a view after a user has selected a UITableView row, the row gets a blue highlight, and then the new view appears. That's fine. But when I go 'back' the row is still highlighted in blue. Here's my didSelectRowAtIndexPath code. -…
cannyboy
  • 24,180
  • 40
  • 146
  • 252
55
votes
3 answers

How to implement tab bar controller with navigation controller in right way

I am using Storyboard and Xcode 6. I have next controllers and scenes in my Storyboard: UINavigationController that has HomeViewController as a root. HomeViewController has a button that Show (e.g. Push) UITabBarController. UITabBarController has 4…
55
votes
6 answers

Custom Animation for Pushing a UIViewController

I want to show a custom animation when pushing a view controller: I would like to achieve something like an "expand" animation, that means the new view expands from a given rectangle, lets say [100,100 220,380] during the animation to full…
Erik
  • 11,944
  • 18
  • 87
  • 126
54
votes
16 answers

Can i pop to Specific ViewController?

I am using navigation based application. I push First ViewController to Second ViewController and from Second ViewController to Third ViewController. Now I want to pop from Third ViewController to First ViewController.I am performing this task using…
Ankit Vyas
  • 7,507
  • 13
  • 56
  • 89