uinavigationbar

How to add a standard info button to a navigation bar in iOS?

ぐ巨炮叔叔 提交于 2019-12-06 03:06:16
I'd like to add a right bar button with the system's info icon to a navigation bar. But I see that UIBarButtonSystemItem does not provide such type of button. On the other hand, so I tried with a UIButton of type UIButtonType.infoLight , but I am not allowed to assign it to navigationItem.rightBarButtonItems . Is there any way to do this? this can be achieved using UIButton object of type .infoLight let infoButton = UIButton(type: .infoLight) infoButton.addTarget(self, action: #selector(infoButtonTapped), forControlEvents: .TouchUpInside) let barButton = UIBarButtonItem(customView: infoButton)

How to increase the height of UINavigationBar?

人盡茶涼 提交于 2019-12-06 01:49:29
问题 Simple question: How can I increase the height of the navigation bar so that additional widgets will fit in there while keeping the blur? Examples are the Calendar app where weekday abbreviations are added to the bottom of the navigation bar... ...and in Mail when you move the mail to a different folder: 回答1: As iAnurag post ans is correct but still have some ui problem (Width is not proper) You can change size by adding category like below Sample Project Download Code #import "ViewController

Navigation bar not appearing?

梦想与她 提交于 2019-12-05 22:07:07
问题 I am currently using a form building library called Eureka(https://github.com/xmartlabs/Eureka) and for some reason whenever I build a form,the navigation bar is not appearing eventhough my view controller is embedded in a navigation controller and it is set to visible.Any help? Here's my repo: https://github.com/ariff20/iTutor Code class SignUpViewController: FormViewController ,UINavigationBarDelegate{ override func viewDidLoad() { super.viewDidLoad() let logButton : UIBarButtonItem =

large Navigation Bar backGround gets clear color when swiping back to root viewController

谁都会走 提交于 2019-12-05 21:32:21
问题 Hey guys i've used largeNavigationBar and it's ok until i swipe back to root view controller and large navigation gets clear color in a nasty way. here's the code: func largeNavigationTitle() { self.navigationController?.view.backgroundColor = VVUtility.navigationBarColor() let productTitle = request?.product?.name self.navigationItem.title = "\(productTitle ?? " ")".localized() self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor : UIColor

Affecting a UINavigationBar's Back Button Method (iOS)

邮差的信 提交于 2019-12-05 21:15:55
I have a table view that pushes to a detail view controller. From the detail view controller, when I press the 'back' button, I'd like an integer value to change. How do I edit the navigation bar back button's action programatically. The back button is automatically placed in my app because I'm using a table view so I didn't actually create the button, so I don't know how to affect it's method. To be clear, I still want the back button to go back to the original view, but simultaneously change an integer's value. Thanks! Chrizzz Thanks PengOne to point me to this direction. Add the

Glitchy animation of UIRefreschControl with large titles for navigation bar

自作多情 提交于 2019-12-05 20:35:39
问题 I have a controller embedded in a navigation controller with Large Titles and a UIRefreshControl. When I pull-to-refresh on my tableView, the animation of the activity indicator is very glitchy. I don't know if I have a bad behaviour in my code ? tableView.refreshControl = UIRefreshControl() tableView.refreshControl?.addTarget(self, action: #selector(downloadData), for: .valueChanged) 回答1: If your have set your navigation bar translucency appearance to false, then you need to include the

Determine correct RGBA value for bar tint color given a client's design image?

孤街浪徒 提交于 2019-12-05 20:31:41
问题 I often get given mockup images that define how an iPhone app is supposed to look. These can come from as many different methods as there are projects, sometimes balsamiq or even hand-drawn, sometimes Photoshop. One thing that is common is a bar tint color specified usually to match some corporate branding or overall app design. If I open one of these design images in an app and use the paint dropper tool to get the RGB value for a color there are many places to do it, from the darkest

iOS5 UINavigationBar background image issues when prompt is shown

断了今生、忘了曾经 提交于 2019-12-05 18:42:50
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 my background image no longer fills that nav bar vertically, so it looks very bad. How can I account

Empty space below navigation bar with displaysSearchBarInNavigationBar = YES

烈酒焚心 提交于 2019-12-05 16:18:53
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 issue except this topic: Empty UISearchbar space when combining search bar with Nav bar in iOS7? I tried

In a container view, a navigation controller's navigation bar not resizing to include status bar

不羁岁月 提交于 2019-12-05 16:13:33
I have created an application which needs to have a bar above the navigation bar and other views. To accomplish this, I am using a view controller with a view for the top bar, and then a container view for everything else. Sometimes, the top bar needs to be hidden. I'm using autolayout to hide the top bar (set its height to 0), and the container view expands to fill the screen (container top equal to the top bar bottom). The container view contains a navigation controller because I need a navigation bar below the top bar sometimes. When I start the app, this all works fine as shown below: As