uinavigationbar

Use the increased navigation-bar title in iOS 11

∥☆過路亽.° 提交于 2019-11-28 16:19:14
iOS 11 Beta 1 uses the increased navigation-bar title for almost all system-apps (it started doing this in iOS 10 and the Music app). I am wondering if Apple has a public API for this coming in iOS 11, or whether it will stay private for now. The behavior is that the title has an increased font-size, is left aligned and will move to the navigation-bar once the user scrolls down. I've attached some screens showing this behavior in the Messages app here: Although I could not find any reference in the UINavigationController and UINavigationBar so far, maybe someone knows some more details! Moin

Navigation bar has wrong position when modal a view controller with flip horizontal transition in iOS 7

我的梦境 提交于 2019-11-28 16:14:16
When I am trying to modal a view controller with flip horizontal transition in iOS7, the origin of navigation bar is (0, 0) at beginning and then jump to the right position at (0, 20). Is it possible to make it behave the same with in iOS6? You can download the project here . I have created a customized navigation bar as following: @implementation MyCustomNavigationBar - (void)drawRect:(CGRect)rect { [super drawRect:rect]; UIImage *image = [UIImage imageNamed:@"Custom-Nav-Bar-BG.png"]; [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; if (IOSVersion <7) {

How do I disable the navigation bar shadow in iOS 6 for navigation bars with custom background images?

霸气de小男生 提交于 2019-11-28 16:04:29
It seems in iOS 6, a drop shadow is automatically added to the navigation bar even when you set a custom background image. I'm pretty sure this wasn't the case with iOS 5 as when I test the same code in the iOS 5 and 6 sim, the shadow appears in iOS 6 but not 5. Does anyone know anything about this? Or how to enable/disable it? Kevin Fernandes Place this in your AppDelegate [[UINavigationBar appearance] setShadowImage:[UIImage new]]; // is IOS 7 and later [[UINavigationBar appearance] setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsDefault]; This is what did it for me. Hope it helps

UINavigationBar Rounded Two Corners

折月煮酒 提交于 2019-11-28 15:52:33
问题 I want to round the top right and top left of the UINavigationBar. I know that there are functions for changing the views corner radius, but is it possible to do something similar to the standard UINavigationBar? If you don't know what I'm talking about, check out this: Thanks! 回答1: The best way is to override drawRect in UINavigationBar and use a custom image. 回答2: the following code works for me (tested on iOS5). The following code rounds the top left/right corners of the main navigation

UINavigationBar/Status Bar issue in IOS7

谁说胖子不能爱 提交于 2019-11-28 15:43:20
Final EDIT (Rather than having an overly long question with edits making a final edit for clarification, please see other edits if needed). Controller Setup I have an application that is setup as follows: InitialViewController (subclass of ECSlidingViewController ) Main Navigation Controller (subclass of UINavigationController ) Main Home View Controller (subclass of UIViewController ) In the viewDidLoad of the initialViewController I load the main navigation controller in with the Home View Controller as its root. self.topViewController = [self.storyboard

iOS 11 SearchBar in NavigationBar

一世执手 提交于 2019-11-28 15:27:30
With iOS 11 Apple has redesigned the UISearchBar by making the corners rounder and the height bigger. Adding a UISearchBar to the navigationBar is pretty simple by just setting it as the titleView of the navigationItem using navigationItem.titleView = searchBar . However, in iOS 11 it does not seem to work anymore as expected. Have a look at the screens where we compare the same setup using iOS 10 and iOS 11 iOS 10 iOS 11 You can clearly see that the SearchBar increases the size of the NavigationBar but the bar buttons do not get aligned correctly. Also the searchBar does not use the available

Remove border in navigationBar in swift

泪湿孤枕 提交于 2019-11-28 15:13:06
i've been trying to remove the navigationBars border without luck. I've researched and people seem to tell to set shadowImage and BackgroundImage to nil, but this does not work in my case. My code self.navigationController?.navigationBar.barTintColor = UIColor(rgba: "#4a5866") self.navigationController?.navigationBar.setBackgroundImage(UIImage(named: ""), forBarMetrics: UIBarMetrics.Default) self.navigationController?.navigationBar.shadowImage = UIImage(named: "") illustration: Nate Cook The trouble is with these two lines: self.navigationController?.navigationBar.setBackgroundImage(UIImage

Navigation bar title bug with interactivePopGestureRecognizer

喜你入骨 提交于 2019-11-28 14:57:11
问题 I am having a weird problem with UINavigationBar 's title in an app when interactivePopGestureRecognizer comes into play. I have made a demo app to showcase this bug. Setup: The rootViewController is a UINavigationController . FirstViewController has the navigation bar hidden, and interactivePopGestureRecognizer.enabled = NO; Second and ThirdViewController s have the navigation bar visible and the popgesture enabled. Bug: The bug occurs when going back from the Second to the First view using

Content falls beneath navigation bar when embedded in custom container view controller.

前提是你 提交于 2019-11-28 14:25:04
问题 UPDATE Based on Tim's answer, I implemented the following in each view controller that had a scrollview (or subclass) that was part of my custom container: - (void)didMoveToParentViewController:(UIViewController *)parent { if (parent) { CGFloat top = parent.topLayoutGuide.length; CGFloat bottom = parent.bottomLayoutGuide.length; // this is the most important part here, because the first view controller added // never had the layout issue, it was always the second. if we applied these // edge

Navigation bar is moving up to statusbar

こ雲淡風輕ζ 提交于 2019-11-28 14:21:01
I have a viewController . Which does not have navigationBar. I am pushing another viewController that has navigationBar. Which is going up I am using following code to show the navigationBar self.navigationController?.setNavigationBarHidden(false, animated: false) I believe you trying to hide navigationBar in firstVC and show it in secondVC . Try following method into your firstVC and make sure you embedded your firstVC with navigationController . Your storyBoard flow layout should be look like below... Implement below method in firstVC. override func viewWillAppear(_ animated: Bool) { self