How to hide the navigation bar in a WPF page
Specify to the page Container, the intention to not have a navigation bar, using NavigationUIVisibility property. <Frame NavigationUIVisibility=”Hidden” Panel.ZIndex=”1″ … />
Specify to the page Container, the intention to not have a navigation bar, using NavigationUIVisibility property. <Frame NavigationUIVisibility=”Hidden” Panel.ZIndex=”1″ … />
This is a bug in iOS 11.2 and happens because the UIBarButtonItem stays highlighted after navigation and does not return to its normal state after the other view controller pops. To avoid this behavior, either use a UIBarButtonItem with a UIButton as a custom view disable and re-enable the bar button item in viewWillDisappear(_:) (although … Read more
I solved the problem with these constraints: NSLayoutConstraint.activate([ scrollView.topAnchor.constraint(equalTo: view.topAnchor), scrollView.leftAnchor.constraint(equalTo: view.leftAnchor), scrollView.bottomAnchor.constraint(equalTo: view.bottomAnchor), scrollView.rightAnchor.constraint(equalTo: view.rightAnchor) ]) You also have to set this property on your UIViewController subclass: extendedLayoutIncludesOpaqueBars = YES
Put this code in the view controller you want to hide the navigation bar for. – (void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; [self.navigationController setNavigationBarHidden:YES animated:animated]; } And you may also want to stick this in there, depending on your needs: – (void) viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated]; [self.navigationController setNavigationBarHidden:NO animated:animated]; }
I’ve modified Mark’s answer a little to get it to work in IOS 8 and in swift. class ViewController : UIViewController, UISearchBarDelegate { var searchBar = UISearchBar() var searchBarButtonItem: UIBarButtonItem? var logoImageView : UIImageView! override func viewDidLoad() { super.viewDidLoad() // Can replace logoImageView for titleLabel of navbar let logoImage = UIImage(named: “logo-navbar”)! logoImageView = UIImageView(frame: … Read more
From the outline view, make sure your Table View Controller is selected. Then go to the Editor menu, and click on the Embed In submenu, and choose Navigation Controller and voila. You have your navigation controller pointing to your tableview controller with a relationship built in.
The latest version of the iOS has brought many visual changes and from a developer’s point of view, the navigation and status bar are two noticeable changes. The status bar is now transparent and navigation bar behind it shows through. The navigation bar image can even be extended behind the status bar. First of all, … Read more
Did you try Apple recommendation about “Preventing the Status Bar from Covering Your Views”: https://developer.apple.com/library/content/qa/qa1797/_index.html And did you have a look at “UIBarPositioningDelegate”: https://developer.apple.com/documentation/uikit/uibarpositioningdelegate
To change the appearance of the text in all UIBarButtonItems appearing in all UINavigationBars, do the following in application:didFinishLaunchingWithOptions: [[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar class], nil] setTitleTextAttributes: @{UITextAttributeTextColor:[UIColor blackColor], UITextAttributeTextShadowOffset:[NSValue valueWithUIOffset:UIOffsetMake(0, 1)], UITextAttributeTextShadowColor:[UIColor whiteColor], UITextAttributeFont:[UIFont boldSystemFontOfSize:12.0] } forState:UIControlStateNormal]; UPDATE: iOS7 friendly version NSShadow *shadow = [[NSShadow alloc] init]; shadow.shadowOffset = CGSizeMake(0.0, 1.0); shadow.shadowColor = [UIColor whiteColor]; [[UIBarButtonItem appearanceWhenContainedIn:[UINavigationBar … Read more
Place this in your AppDelegate [[UINavigationBar appearance] setShadowImage:[UIImage new]]; // is IOS 7 and later [[UINavigationBar appearance] setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; Swift version with updates from comments UINavigationBar.appearance().shadowImage = UIImage() UINavigationBar.appearance().setBackgroundImage(UIImage(), forBarMetrics: .Default)