uinavigationbar

UINavigationBar refuses to show in Modal View Controller

寵の児 提交于 2019-12-07 14:32:48
问题 I am loading a Modal view controller using the following code in my RootViewController: [self.navigationController presentModalViewController:accountViewController animated:YES]; In the accountViewController xib file, I have set a navigation bar. My MainWindow.xib and RootViewController.xib also have the navigation bar setup correctly. Additionally, my app delegate has setup the navigation controller (I assume) correctly: UINavigationController *aNavigationController = [

UINavigationControoller - setNavigationBarHidden:animated: How to sync other animations

我只是一个虾纸丫 提交于 2019-12-07 10:40:06
问题 How can I capture the animation curve and speed when I hide the navigation bar programmatically? I would like to sync other animations with this one for a fluid transition :) 回答1: If you check the UINavigationController documentation there is this line: For animated transitions, the duration of the animation is specified by the value in the UINavigationControllerHideShowBarDuration constant. 回答2: Below is a code snippet for those who would like to take the advice of the accepted answer, but

Customizing Title in the NavigationBar for a ABPeoplePickerNavigationController

可紊 提交于 2019-12-07 09:55:28
问题 I have created an AddressBook kind of application where I display a list of people in a UITableView, when a person is selected an ABUnknownPersonViewController is pushed. From this ABUnknownPersonViewController the user is able (by using the built in functionality) to either add the person to a "New Contact" or "Existing Contact". This is where my problem is located. I am using a Custom UILabel for the NavigationBar title throughout my application. And I need to be able to do this for the

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

天涯浪子 提交于 2019-12-07 09:13:35
问题 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

Change title of a navigation bar button item

那年仲夏 提交于 2019-12-07 08:22:03
问题 let button = UIButton() button.setImage(UIImage(named: "coin_icon"), forState: UIControlState.Normal) button.addTarget(self, action:#selector(Profile.goCoin), forControlEvents: UIControlEvents.TouchDragInside) button.frame=CGRectMake(0, 0, 30, 30) let barButton = UIBarButtonItem(customView: button) self.navigationItem.rightBarButtonItem = barButton My code is this to add a bar button on navigation bar. However, i need to change the title of button in a function func changetitle() { self

Change textColor of UINavigationBar “prompt”?

别说谁变了你拦得住时间么 提交于 2019-12-07 08:04:17
问题 Any (supported) way of doing this? IIRC it usually switches over by itself to a white color at some point when using a "darker than X" tintColor, but we seem to be just on the edge with our scheme. 回答1: I guess the only way to really do it is to use a custom titleView for each UINavigationItem . You can use a UILabel and try to match the built-in navigation title style as closely as you can, then assign your own text color. 回答2: It's possible in iOS5: [[UINavigationBar appearance]

iOS 7 detail layout when master has navigation bar prompt

混江龙づ霸主 提交于 2019-12-07 07:46:13
问题 I run into a layout problem in iOS 7: To reproduce create a simple master-detail-app and insert this line in MasterViewController.m : self.navigationItem.prompt = @"Master"; and this in DetailViewController.m : self.edgesForExtendedLayout = UIRectEdgeNone; Both lines in viewDidLoad . The detail view's frame does not update correctly when the navigation bar shrinks to its normal size. How should I fix this? 回答1: My current solution to this is to remove the prompt in the master view 's

ABPeoplePickerNavigationController - remove “Cancel” button without using private methods/properties?

狂风中的少年 提交于 2019-12-07 06:41:40
问题 I'm using the ABPeoplePickerNavigationController, a subclass of UINavigationController, and in the context I'm using it the default nav bar button for the right side, "Cancel", makes no sense. I can't find a way to disable or hide it, and whatever method used needs to be public and store-approvable. Getting rid of the nav bar entirely (picker.navigationBarHidden = YES;) might be an option except that after popping back to the list of contacts the nav bar reappears. Subclassing

Unicode character(s) that look like iOS7 left-pointing navigation chevron

可紊 提交于 2019-12-07 06:05:12
问题 What are the Unicode characters that most closely approximate the size (as large or larger than a capital letter) and shape of the iOS7+ backwards-pointing Navigation Bar chevron? I'm looking for a hacky way to use unicode characters to simulate the "navigate back" chevron for a view that doesn't normally have "go back" navigation. A regular < (less-than sign) is not good because it's not tall enough and not vertically centered. A ‹ (European left quote) is more vertically centered but it's

Search bar getting hidden by navigation bar when becomes active

孤街浪徒 提交于 2019-12-07 05:49:19
问题 I am facing a weird scenario, I have used a search bar in my application and tied it up with a table view as is seen in the below image! But when ever I try to search anything the search bar slides up and gets hidden by navigation bar, I have used search bar a number of times and never seen me thing like this below is its screen shot ! I can't remove the navigation bar since I need it, but I just can't figure out why or how it can be happening, One point to note is that the search bar and it