uinavigationbar

UINavigationController not popping UINavigationBar items

限于喜欢 提交于 2019-12-01 20:39:29
I'm having a problem where my UINavigationBar isn't popping it's items when the UINavigationController pops a view controller. I have had a look at the stacks observed the following: The expected number of navigation controllers allocated (checked in instruments) There are the correct number of controllers on the stack. (debug logging) The navigation items aren't being popped. (debug logging) Here's what I did. I popped some log statements into the viewDidLoad method after calling super. NSLog(@"%@", [self navigationController]); NSLog(@"%@", [[self navigationController] viewControllers]);

Tweak UI Navigation on iOS 11

*爱你&永不变心* 提交于 2019-12-01 19:05:41
I have a problem with a navigation bar in iOS 11. I use this code: [UINavigationBar appearance].prefersLargeTitles = YES; ...to set a new style for my app. It works well untill a user pull to refresh on the table view; then it breaks. This is before pull-to-refresh: ...and this is _after: Note: I use the table view controller's built-in pull-to-refresh control. I searched for a solution but it still eludes me. If someone knows how to fix this please drop some advice. Thanks for the support :) I have catch this bug too, and we have found the solution. You must constraint your UITableView to

UINavigationBar title label text

风流意气都作罢 提交于 2019-12-01 18:24:47
Is it possible to get the title text to shrink to fit in the UINavigationBar in iOS. (for portrait iPhone app with no autolayout). I'm setting the title bar dynamically but sometimes the text is too long and at the moment it just cuts it off with an ellipsis. i.e. "This is the t..." I'd like it to shrink the text instead. You can create your own title view to make it. Something like this: - (void)viewDidLoad { [super viewDidLoad]; //Do any additional setup after loading the view, typically from a nib. UILabel *titleLabelView = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 200, 40)]; //<<----

Add a back arrow to leftBarButtonItem?

回眸只為那壹抹淺笑 提交于 2019-12-01 17:35:00
I want to add a back arrow to a leftBarButtonItem , to make it appear visually as if it was a regular back button, although it's functionality is slightly different. Is there a way to do this? You can use custom button and hide the back button if you are using navigation controller. To hide back button use this: self.navigationItem.hidesBackButton = YES; And for Custom Button: UIButton * customButton = [UIButton buttonWithType:UIButtonTypeCustom]; [customButton setBackgroundColor:[UIColor colorWithRed:197.0/255.0 green:190.0/255.0 blue:157.0/255.0 alpha:1.0]]; [customButton setTitle:@"Do

Add a back arrow to leftBarButtonItem?

风流意气都作罢 提交于 2019-12-01 17:09:58
问题 I want to add a back arrow to a leftBarButtonItem , to make it appear visually as if it was a regular back button, although it's functionality is slightly different. Is there a way to do this? 回答1: You can use custom button and hide the back button if you are using navigation controller. To hide back button use this: self.navigationItem.hidesBackButton = YES; And for Custom Button: UIButton * customButton = [UIButton buttonWithType:UIButtonTypeCustom]; [customButton setBackgroundColor:

Unwanted double navigation bar

被刻印的时光 ゝ 提交于 2019-12-01 16:34:10
问题 I made the navigation bar (top bar) appear/disappear when I tap the screen, and also lay on top of the background image. It worked, but with one problem: I've suddenly got two navigation bars! First, one with a back button named "Back", and when I press "Back" it pops up a new navigation bar with a back button named "Vinene", which is the title of the TableView it leads back to. Thats the one I want to keep. I think the issue is somewhere in the DetailViewController.m or in the

UIBarButton Item on screen edge in iOS 8 when used in standalone view

陌路散爱 提交于 2019-12-01 16:10:12
In my UINavigation bar added to a XIB with a number of UIViews the positioning of the left and right bar button item is way off: The view in the XIB simply has an outlet to a view controller, but is not the main view. It's shown via: [UIView transitionFromView:self.view toView:self.settingsView duration:0.2 options:UIViewAnimationOptionTransitionFlipFromLeft completion:NULL]; I have another simpler view which is directly bound to the view property of a view controller which - as expected - looks just normal. All the views have auto layout. The constraints are fine. I tried a number of

Separator between navigation bar and view - iOS 7

主宰稳场 提交于 2019-12-01 16:06:17
In iOS 7 there's a grey separator between the navigation bar and the view. Back in iOS 6, there wasn't that horizontal line, thus the view would blend in with the navigation bar as if they were the same image. Now I don't know how to remove it... I've tried resizing the view / navigation bar, but it doesn't help. Any ideas? Try with self.navigationController.navigationBar.translucent = NO; In your viewDidLoad method and let me know :) If you need this effect on every ViewController, you could simply do: [[UINavigationBar appearance] setTranslucent:NO] Or you'll need to do this where you first

How can i add more than 10 buttons on a navigationbar in iphone application development?

人走茶凉 提交于 2019-12-01 14:26:24
In my application I have to add 8 buttons on a navigation bar..So it's very much normal that these button should be in a view and there should be one previous and next button. When i will press the next button then using animation it will show the next buttons whose are out of the view and same as for previous button. For Details: UINavigation Bar -> leftBaritem[previous button] + view + rightBaritem[next button]; view will contain 8 buttons. If I explain again then it should be look like this: Previous + | A | B | C | D | E | F | G | H + next when I will press next then it will show like this

UIBarButton Item on screen edge in iOS 8 when used in standalone view

随声附和 提交于 2019-12-01 14:26:10
问题 In my UINavigation bar added to a XIB with a number of UIViews the positioning of the left and right bar button item is way off: The view in the XIB simply has an outlet to a view controller, but is not the main view. It's shown via: [UIView transitionFromView:self.view toView:self.settingsView duration:0.2 options:UIViewAnimationOptionTransitionFlipFromLeft completion:NULL]; I have another simpler view which is directly bound to the view property of a view controller which - as expected -