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
77
votes
15 answers

iOS 11 navigationItem.titleView Width Not Set

Seeing a behavior on iOS11 with a navigationItem.titleView where the width of the titleView is not the full width of the screen. I have a custom view that I set as the titleView. Previous to iOS11 the view would fill the navigation bar area. But iOS…
gngrwzrd
  • 5,902
  • 4
  • 43
  • 56
77
votes
13 answers

iOS 7 Translucent Modal View Controller

The App Store app on iOS 7 uses a frosted glass-type effect where it is possible to see the view behind. Is this using an API built into iOS 7 or is it custom code. I was hoping it would be the former but I can't see any obvious references in the…
76
votes
8 answers

Set data in `prepareForSegue` with navigation controller

I am developing an iOS application in Swift. I want to send data from a view to an other one, using the prepareForSegue function. However, my target view is preceded by a navigation controller, so it doesn't work. How can I set data on the VC…
cedric petetin
  • 789
  • 1
  • 7
  • 11
76
votes
10 answers

Trying to handle "back" navigation button action in iOS

I need to detect when the user taps the "back" button on the navigation bar, in order to perform some operations when that occurs. I'm trying to set manually an action to such button, this way: [self.navigationItem.backBarButtonItem…
AppsDev
  • 12,319
  • 23
  • 93
  • 186
74
votes
7 answers

Creating a navigationController programmatically (Swift)

I've been trying to redo the work on my app programmatically. (Without the use of storyboards) I'm almost done, except making the navigation controller manually. Currently, I only have 1 viewcontroller. And of course the appDelegate The navigation…
MLyck
  • 4,959
  • 13
  • 43
  • 74
73
votes
6 answers

iOS7 UIModalTransitionStyleFlipHorizontal bounces after transition

I'm updating my app for iOS 7 and I discovered a weird problem. I'm presenting a UIViewController wrapped in a UINavigationController with UIModalTransitionStyleFlipHorizontal. In iOS 6 it works fine, but in iOS 7 the navigation bar bounces after…
71
votes
17 answers

Swift Custom NavBar Back Button Image and Text

I need to customise the look of a back button in a Swift project. Here's what I have: Here's what I want: I've tried creating my own UIBarButtonItem but I can't figure out how to get the image to be beside the text, rather than as a background or…
Conor
  • 1,007
  • 1
  • 10
  • 16
71
votes
2 answers

Pushing a navigation controller is not supported

In my MainStoryBoard I want to push a viewController to the detailView but I get this error: NSInvalidArgumentException', reason: 'Pushing a navigation controller is not supported' I set the identifier 'JSA' ID for the viewController on the…
Jose
  • 1,027
  • 1
  • 14
  • 23
70
votes
13 answers

UIPopoverController automatically resizing to max height on pushViewController

I have a popover containing a UINavigationController. I can display the popover fine, and it contains the navController just fine. The navController contains a tableView and when I select an item it creates a new detail view: …
SG1
  • 718
  • 1
  • 6
  • 4
69
votes
7 answers

iOS 7 -- navigationController is setting the contentInset and ContentOffset of my UIScrollView

I have a UIScrollView (actually a UICollectionView, but that probably doesn't matter). When it appears in IOS 7, the navigation controller sets its contentInset and contentOffset to values I don't want. It appears to be trying to adjust for the…
William Jockusch
  • 26,513
  • 49
  • 182
  • 323
68
votes
20 answers

iPhone UINavigation Issue - nested push animation can result in corrupted navigation bar

I keep getting the following errors: 2011-04-02 14:55:23.350 AppName[42430:207] nested push animation can result in corrupted navigation bar 2011-04-02 14:55:23.352 AppName[42430:207] nested push animation can result in corrupted navigation…
joshholat
  • 3,371
  • 9
  • 39
  • 48
66
votes
15 answers

Prevent a UISearchDisplayController from hiding the navigation bar

Whenever a user begins editing a UISearchDisplayController's search bar, the search controller becomes active and hides the view's navigation bar while presenting the search table view. Is it possible to prevent a UISearchDisplayController from…
65
votes
13 answers

Deinit never called

I'm creating a ViewController object an pushing it to a navigation controller. When the object is being popped from the stack - it is not being release and Deinit is not being called. What can be the reason for that? Here's the code that…
YogevSitton
  • 10,068
  • 11
  • 62
  • 95
64
votes
7 answers

Change the navigation bar's font

The question is plain easy and simple, the answer unfortunately not. How can you change the font of the text in the UINavigationBar?
Joetjah
  • 6,292
  • 8
  • 55
  • 90
64
votes
27 answers

iOS 11 prefersLargeTitles not updating until scroll

I implemented a basic UIViewController with a UITableView that's wrapped in a UINavigationController. I set prefersLargeTitles to true: override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view,…
John Breen
  • 743
  • 1
  • 5
  • 6