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
34
votes
3 answers

In UINavigationController what is the difference between topViewController, visibleViewController, presentedViewController?

UINavigationController has 3 controllers that all sound very similar to me: topViewController, visibleViewController, and presentedViewController. Which scenarios do you use each of these controllers in?
34
votes
9 answers

How to prevent status bar from overlapping content with hidesBarsOnSwipe set on UINavigationController?

I'm trying to use the new feature added in iOS 8 - hiding the navigation bar while user is scrolling the table view (similar to what mobile Safari does). I'm setting the property hidesBarsOnSwipe of UINavigationController to YES in viewDidAppear…
Michał Ciuba
  • 7,876
  • 2
  • 33
  • 59
34
votes
4 answers

Setting a property in a segue with Navigation Controller containing another view

I'm getting a crash when trying to set a property in my segue. It's a UIView passing a property to a Navigation Controller that has a TableView as it's root view. It's supposed to go to my TableViewController, but it looks like it is getting…
user2529626
34
votes
9 answers

ios 7 view with transparent content overlaps previous view

Recently I updated my xcode project to work with iOS 7, but i faced a big problem. Because my whole application has only one background image (UIImageView added to key window) and all views are transparent, I face a problem when pushing…
Edvardas
  • 586
  • 1
  • 4
  • 10
33
votes
6 answers

Custom navigation bar

I was crawling Dribble and found the attached design. I was wondering how to do a custom navigation bar like this. I mean how create the navigation bar once and reuse it implicitly for every view controllers. I was thinking about having a kind of…
33
votes
6 answers

iOS - UINavigationController adding multiple right items?

I have a UINavigationController. I'm trying to add multiple buttons on the right side of my navigationBar. How can I achieve this? What kind of button does it take? UIBarButton or UINavigationItem?
aryaxt
  • 76,198
  • 92
  • 293
  • 442
32
votes
8 answers

pushviewcontroller animation is slow/choppy

I push a ViewController which contains not too many views, UIScrollView which contains 10 views inside, I have a singleton ViewController and push it again and again without releasing and allocation again the ViewController, so all the things I do…
32
votes
3 answers

SwiftUI – How to set the title of a NavigationView to large title (or small)?

Using SwiftUI how do I change the navigation bar's title size? Choosing between a standard or a large title.
32
votes
8 answers

How to hide parent tabbar when pushing controller in navigationController

I have an application with a tab bar controller and each view contains a navigation controller. My MainWindow looks as follows: Image here http://www.freeimagehosting.net/image.php?7bc867a594.png Everything works fine as it is but I noticed a…
Yannis
  • 6,047
  • 5
  • 43
  • 62
32
votes
8 answers

Allow video on landscape with only-portrait app

I have a UIWebView included in a UIViewController which is a descendant of UINavigationController. It looks like this: The app is portrait only. When I play the video I want the user to be able to rotate the device and see the video in landscape…
entropid
  • 6,130
  • 5
  • 32
  • 45
32
votes
11 answers

Hiding a UINavigationController's UIToolbar during viewWillDisappear:

I've got an iPhone application with a UITableView menu. When a row in the table is selected, the appropriate view controller is pushed onto the application's UINavigationController stack. My issue is that the MenuViewController does not need a…
Nathan de Vries
  • 15,481
  • 4
  • 49
  • 55
31
votes
8 answers

Storyboard - Hiding top bar of navigation controller programmatically

I'm using a storyboard and I'm trying to hide a top bar of my main navigation controller when a certain button is pressed (or function is called). I know I have to initialize an object referring to a navigation controller from a storyboard (using…
animal_chin
  • 6,610
  • 9
  • 37
  • 41
31
votes
5 answers

How to constrain autorotation to a single orientation for some views, while allowing all orientations on others?

This question is about iOS device rotation and multiple controlled views in a UINavigationController. Some views should be constrained to portrait orientation, and some should autorotate freely. If you try and create the simplest setup with three…
31
votes
2 answers

dismissViewControllerAnimated VS popViewControllerAnimated

I want to know what is the different of them. when I can call [self dismissViewControllerAnimated:YES completion:nil]; and when I should call [self.navigationController popViewControllerAnimated:YES]; according document of…
kevin young
  • 941
  • 2
  • 10
  • 22
30
votes
8 answers

Adding same button to all view controllers in UINavigationController

I have a UINavigationController (to use like a wizard page) which I create programmatically and I need to display a "Cancel" button to cancel the process in any UIViewController. Creating the UINavigationController: FirstVC *firstVC = [[[FirstVC…
Ozay
  • 443
  • 1
  • 6
  • 12