Questions tagged [uinavigationbar]

The UINavigationBar class implements a control for navigating hierarchical content in iOS. It’s a bar, typically displayed at the top of the screen, containing buttons for navigating up and down a hierarchy. The primary properties are a left (back) button, a center title, and an optional right button. You can specify custom views for each of these. The most common way to use a navigation bar is in conjunction with a UINavigationController object

A navigation bar enables navigation through an information hierarchy and, optionally, management of screen contents. A navigation bar is contained in a navigation controller, which is an object that manages the display of the hierarchy of custom views. A navigation bar appears at the upper edge of an application screen, just below the status bar.

A navigation bar usually displays the title of the current screen or view, centered along its length. When navigating through a hierarchy of information, users tap the back button to the left of the title to return to the previous screen. Otherwise, users can tap content-specific controls in the navigation bar to manage the contents of the screen.

All controls in a navigation bar include a bezel around them, which, in iOS (), is the bordered style. If you place a plain (borderless) control in a navigation bar, it automatically converts to the bordered style.

A navigation bar can be translucent or opaque. If the bar is translucent, the top edge of the main content view meets the bottom edge of the status bar, so that users can see the content behind the navigation bar. If the bar is opaque, the top edge of the main content view meets the bottom edge of the navigation bar.

On iPhone (), changing the device orientation from portrait to landscape can change the height of the navigation bar automatically. On iPad (), the height and translucency of a navigation bar does not change with rotation.

On iPhone, a navigation bar always displays across the full width of the screen. On iPad, a navigation bar can display within a view, such as one pane of a split view, that does not extend across the screen.

References:

6208 questions
2
votes
1 answer

How can I set popover title bar color to the same as default navigationBar?

I have some buttons on popover title bar, they are in dark color, so that I want to the popover title bar color can be changed to the same as Navigation Bar color, what can I do? You will see the gray title bar in popover, how can I do it?
mikezang
  • 2,291
  • 7
  • 32
  • 56
2
votes
0 answers

NavigationBar Height without using NavigationController In iOS11

As below, I set NavigationBar Height without using NavigationController. (use navigation bar as a standalone object) UINavigationBar* navbar = [[UINavigationBar alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width,…
ntmy
  • 21
  • 2
2
votes
1 answer

I am trying to switch between activities using the navigation drawer, and not fragments

Below is the code which I have for my application. Ive tried working on this but have not came across anything that works sucessfully for me. Without changing to fragments what is there that I can do. public boolean onNavigationItemSelected(MenuItem…
S.Doyle
  • 215
  • 3
  • 17
2
votes
4 answers

Setting Bar Button Item color in a custom navigation bar

I created a custom navigation bar and a right navigation button using the XIB. This works fine. But I need to to customize the tint color of the right navigation button. At the moment this tint color is the same color as tint color of navigation…
Dilshan
  • 3,231
  • 4
  • 39
  • 50
2
votes
4 answers

Vertical ul li navigation with bigger centered dropdown

I thought it would have been simple, I'm trying to make a small navigation with numbers which show a name below on hover which should be like this : But I don't know how to keep it centered and without having big margins between numbers. Here is a…
Léo Durand
  • 215
  • 1
  • 4
  • 13
2
votes
3 answers

Why isn't my nav bar working?

So, I'm relatively new to HTML and CSS, and I have researched as to why my nav bar is not working plenty of times, but I can never seem to get it to work. Essentially, the items do not drop down when I hover over them, and if I change display: none;…
user5132897
2
votes
2 answers

iOS Swift Transition from normal navigation bar to transparent bar

I googled for similar issues, but none of them actually solves this. I tried to push from a view controller with normal navigation bar, to a new view controller with transparent navigation bar. This is the code in 2nd view controller that I used to…
2
votes
3 answers

Change Navigation Bar Attributes in Only One ViewController

I have an application's navigation bar set in the AppDelegate. In one of my ViewController's I'm trying to set the attributes differently - they work however when I get to other VC's the still persist. What is the correct way to implement…
2
votes
1 answer

Wrong text color in buttons when sharing with WhatsApp via UIActivityViewController

When I share an text to WhatsApp with the UIActivityViewController the second screen of the sharing, for my case, has the wrong button colors. The first screen is OK. This issue has been discussed a lot of times and one great bucket of answers can…
2
votes
1 answer

Navigation Bar Expands When isTranslucent = False (Swift 3)

I have a table view with a search bar. But, when I click the search bar it seems that the Navigation Bar expands and creates a blank white space beneath it. However, this only occurs when self.navigationController?.navigationBar.isTranslucent =…
2
votes
1 answer

Customizing more in UITabBarController - "configure"

How to modify the UINavigationBarTintColor for "Configure" in "more" in UITabBarController? I have 10 UINavigationController within a UITabBarController (everything using Interface builder. ) I can easily set the tint color of all…
2
votes
1 answer

Animating a navigation bar color

I am trying to animate a change of color of a navigation bar when popping back to a previous controller. To give it some context, I have controller A which is a collectionView Controller and has an opaque navigation bar color set…
Paulo
  • 602
  • 1
  • 8
  • 20
2
votes
1 answer

iOS - Resizing Navigation Bar height with detail

I want to make a navigation bar that changes height in it's detail view just like the messages app in iOS 10. How can I do that? Edit: I am looking to change the height dynamically. SizeThatFits() Permanently changes the height.
evenwerk
  • 947
  • 1
  • 12
  • 28
2
votes
2 answers

Setting a background color with alpha in Navigation bar

I'd like the background of a navigation bar to be a color with 0.5 alpha to be able to partially see the contents of the view below. I've tried to do like this: override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) …
AppsDev
  • 12,319
  • 23
  • 93
  • 186
2
votes
2 answers

Implementing a custom Navigation Bar in Swift

I would like to have a custom Navigation Controller, I did a lot of search, I read many questions on Stack, etc. But I still don't know how to do that. I would like to do that Navigation Bar: It's really difficult to add icons, and even more if I…
KevinB
  • 2,454
  • 3
  • 25
  • 49
1 2 3
99
100