uinavigationbar

how to disable a navigation bar button item in iOS

醉酒当歌 提交于 2019-11-30 16:25:54
问题 I have created a navigation controller. In the second view (which is pushed), I have some webservice call and placing a overlay view and setting self.view.userInteractionEnabled = NO ; Once web service call is complete, then I am reverting to self.view.userInteractionEnabled = YES ; When I do this, every other buttons except the buttons on the navigation bar are disabled. How to disable those two navigation bar button items ? (a button similar to back button, which pops to first view

MPMoviePlayerController can exit fullscreen but topbar is gone

二次信任 提交于 2019-11-30 16:25:40
I am streaming a movie on the iPad using MPMoviePlayerController . When the user rotates the device to landscape, I animate it to fullscreen . If the user then taps ' exit fullscreen ' or 'done', the movie animates back to its small frame (native behavior), BUT-- the top bar (navigation bar) is gone . Also, the visible views have moved upwards, behind and beyond the status bar. Note that I haven't touched the top bar whatsoever. I have not manually hidden it. I have tried regaining the navigation bar by sending setNavigationBarHidden:animated to the current viewcontroller's navigation

set custom back bar button universally with no title

不想你离开。 提交于 2019-11-30 15:47:05
问题 I want to set custom back bar button for all controllers in the app. I tried using this: [[UIBarButtonItem appearance] setBackButtonBackgroundImage:backButtonImage forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; It sets the image. That's OK. But, what i really want to do is that, i just want a custom button for back bar button which does not contain any title etc. The code above works, but it adds automated titles and resizes the back bar button item. My need is to have a fixed

Issue with button on the left side of the uinavigation bar

孤街浪徒 提交于 2019-11-30 15:42:49
I have a button on the left side of the navigation bar. I also have a UIButton near that button. Now when I click the button thats below the navigation bar, in many cases, the button on the nab bar gets clicked. Any idea why this is happening? Any suggestions ? Thanks. image: if you click anywhere inside the red button, the top left button of the nav bar still gets pressed. code for nav bar button: UIButton *leftButton = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 25, 25)]; [leftButton setShowsTouchWhenHighlighted:NO]; [leftButton setImage:[UIImage imageNamed:@"deals.png"] forState

using UINavigationBar without UINavigationController

元气小坏坏 提交于 2019-11-30 15:15:32
问题 I want a UINavigationBar at the top of my UIWebView but I want to control by hand the title, the back button, what the back button does - etc. In other words I never want to push or pop views. I just want to change the UINavigationBar contents as the user clicks around the web view. Where I'm up to is I added the UINavigationBar to my superView and made it 44 pixels tall. How do I set the title since I have no navigationItem? How would I set a fake back button up? I would appreciate any

set custom back bar button universally with no title

柔情痞子 提交于 2019-11-30 15:15:32
I want to set custom back bar button for all controllers in the app. I tried using this: [[UIBarButtonItem appearance] setBackButtonBackgroundImage:backButtonImage forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; It sets the image. That's OK. But, what i really want to do is that, i just want a custom button for back bar button which does not contain any title etc. The code above works, but it adds automated titles and resizes the back bar button item. My need is to have a fixed frame, no-title back bar button item for all controllers in the app. I've resolved it. Just make a

UINavigationBar TitleView with subtitle

ⅰ亾dé卋堺 提交于 2019-11-30 14:42:23
问题 I want a titleView inside my UINavigationBar which has two lines of text instead of only one My current implementiation works well when I have a "Back"-Button and an "Edit" Button because it looks nearly centered. The problem is when I only have one of the Buttons. It looks really weird and wrong because the view centers itself on the available space. UINavigationBar with left and right Button UINavigationBar with only one Button This is my current implementation: CGRect frame = self

using UINavigationBar without UINavigationController

丶灬走出姿态 提交于 2019-11-30 13:48:22
I want a UINavigationBar at the top of my UIWebView but I want to control by hand the title, the back button, what the back button does - etc. In other words I never want to push or pop views. I just want to change the UINavigationBar contents as the user clicks around the web view. Where I'm up to is I added the UINavigationBar to my superView and made it 44 pixels tall. How do I set the title since I have no navigationItem? How would I set a fake back button up? I would appreciate any pointers. I realise this is quite weird what I'm doing. Thanks :) The answer, if anyone's interested, is in

What is the default background color of the navigation bar in iOS 7?

不羁岁月 提交于 2019-11-30 13:41:21
问题 I would like to set the background color of a menu to that of the navigation bar. What is the best way to do this? 回答1: The default navbar color in iOS 7 is [UIColor colorWithRed:(247.0f/255.0f) green:(247.0f/255.0f) blue:(247.0f/255.0f) alpha:1]; 回答2: To get the tint color of a navigation bar, do this: [aNavbar barTintColor] By using this when you set the background color of your menu, you will not have to change it in case you change your navigation bar tint. 回答3: Swift 5 Nav bar color in

swift: setting back button image in nav bar

两盒软妹~` 提交于 2019-11-30 13:21:36
问题 I'm trying to set the back button image in nav bar in my controller, here's my code in viewDidLoad(): var backImg: UIImage? = UIImage(named: "back_btn.png") println(backImg) if var back_img = backImg { println("GET IT") println(back_img) println(UIControlState.Normal) println(UIBarMetrics.Default) self.navigationController.navigationBar.backItem.backBarButtonItem.setBackButtonBackgroundImage(back_img, forState: UIControlState.Normal, barMetrics: UIBarMetrics.Default) } I tried to put them to