uinavigationbar

UINavigationBar Bottom Separator Line Color

℡╲_俬逩灬. 提交于 2019-12-23 01:27:19
问题 How can I change the line's color that separates the navigation bar and the view? For instance flickr changed it to gray (http://www.geardiary.com/wp-content/uploads/2009/09/Screen-shot-2009-09-08-at-8.00.06-AM.png) By default mine is always black... Thanks in advance for your help, nico 回答1: They used a custom bottom bar and not the Apple provided ones. I dont know your setup, but if you can make or draw your own custom view however you want (you can do this), and stick buttons on it (you

iOS5 UINavigationBar background image issues when prompt is shown

徘徊边缘 提交于 2019-12-22 09:38:42
问题 I am using the new appearance proxy in iOS 5 to style my UINavigationBar with a background image. [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"ZSNavigationBG.png"] forBarMetrics:UIBarMetricsDefault]; [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"ZSNavigationLandscapeBG.png"] forBarMetrics:UIBarMetricsLandscapePhone]; This works fine, but I need to set the prompt property of the nav bar. When I do that, the height of the nav bar increases, and

Subclassing UINavigationBar in Swift

谁都会走 提交于 2019-12-22 08:42:12
问题 I'm trying to create a custom UINavigationBar class and then use the Storyboard to set it as the class of my UINavigationController 's NavigationBar. Here's the code of my UINavigationBar class: class CustomNavBar: UINavigationBar { override func drawRect(rect: CGRect) { super.drawRect(rect) // Drawing code self.backgroundColor = UIColor.orangeColor() let myLabel = UILabel(frame: CGRect(x: 0, y: 4, width: 600, height: 36)) myLabel.backgroundColor = UIColor.purpleColor() myLabel.textColor =

Subclassing UINavigationBar in Swift

旧巷老猫 提交于 2019-12-22 08:41:31
问题 I'm trying to create a custom UINavigationBar class and then use the Storyboard to set it as the class of my UINavigationController 's NavigationBar. Here's the code of my UINavigationBar class: class CustomNavBar: UINavigationBar { override func drawRect(rect: CGRect) { super.drawRect(rect) // Drawing code self.backgroundColor = UIColor.orangeColor() let myLabel = UILabel(frame: CGRect(x: 0, y: 4, width: 600, height: 36)) myLabel.backgroundColor = UIColor.purpleColor() myLabel.textColor =

UINavigationBar slides away instead of staying on place

给你一囗甜甜゛ 提交于 2019-12-22 08:23:50
问题 I created demo project to show the problem. We have two view controllers inside UINavigationController. MainViewController which is the root. class MainViewController: UIViewController { lazy var button: UIButton = { let button = UIButton() button.setTitle("Detail", for: .normal) return button }() override func viewDidLoad() { super.viewDidLoad() navigationItem.title = "Main" view.backgroundColor = .blue view.addSubview(button) button.translatesAutoresizingMaskIntoConstraints = false button

Empty space below navigation bar with displaysSearchBarInNavigationBar = YES

走远了吗. 提交于 2019-12-22 08:07:20
问题 I've an issue with a search bar in a navigation bar using the property displaysSearchBarInNavigationBar = YES . I have an empty space between the navigation bar and the search content which is equals to the height of the navigation item + status bar. It's just as if during building the view, the framework doesn't know that my search bar is the navigation bar... This empty space appears before tipping anything, and when displaying the result tables. I haven't found anything related to this

iOS 10 contacts photo goes on navigation bar

巧了我就是萌 提交于 2019-12-22 05:54:43
问题 I want build a view controller with the same animation of Contacts app in iOS 10. When you scroll down the page the contact's photo goes in the middle of navigation bar. There is an API in iOS 10 or is a custom implementation? 回答1: Research There are many techniques trying to modify the navbar. I have spent a lot of hours by trying one after another: Apple's official tutorial https://developer.apple.com/library/content/samplecode/NavBar/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007418

iOS 10 contacts photo goes on navigation bar

给你一囗甜甜゛ 提交于 2019-12-22 05:54:09
问题 I want build a view controller with the same animation of Contacts app in iOS 10. When you scroll down the page the contact's photo goes in the middle of navigation bar. There is an API in iOS 10 or is a custom implementation? 回答1: Research There are many techniques trying to modify the navbar. I have spent a lot of hours by trying one after another: Apple's official tutorial https://developer.apple.com/library/content/samplecode/NavBar/Introduction/Intro.html#//apple_ref/doc/uid/DTS40007418

Unable To Hide Navigation Bar during AlertDialog/LoginDialog

点点圈 提交于 2019-12-22 05:26:14
问题 I'm attempting to hide the navigation bar globally through my app running Android 4.2.2 I have managed to use the following (admitadly hackish) method of implementing: getWindow().getDecorView().setSystemUiVisibility(8); Which successfully removes the Navigation bar (the fact it is hackish is perfectly fine - this is for a kiosk so it will only be installed on a limited number of devices) Now I'm attempting to remove the navigation bar in places other than my MainActivity - such as when it

Resizing UINavigationBar on rotation

梦想的初衷 提交于 2019-12-22 04:46:07
问题 I have a subclass of UIViewController which handles a UIView. The viewcontroller is presented modally (it slides up from the bottom of the screen). At the top of the view, i have added a navigation bar. Note that this bar is not handled by a navigation controller. I want to get the navbar to shrink in height when the view rotates to landscape (similar to how it behaves when it is handled by a UINavigationController). However, I can't set its autoresizing mask to flexible height in IB, and