uinavigationbar

Search Bar in a Navigation Item collapses and gets stuck under status bar upon navigation pop, on iOS 11

我与影子孤独终老i 提交于 2019-12-07 04:15:39
问题 I am using the new iOS 11 searchContoller property of a UINavigationItem . I am running iOS 11.0 GM build. When I perform a push segue whilst the search controller is active, it works fine. When I subsequently pop back, the search bar is collapsed and squashed up in the status bar. I cannot then cancel the search, or edit the search text. See the following sequence of images: The final image is showing the appearing of the table during the pop segue to return from a presented view controller

how to set uitoolbar's background similar to my navigation bar

本小妞迷上赌 提交于 2019-12-07 03:23:57
问题 Hello everyone: I have set a custom background for my navigation bar, it's a tint color i think that i chose from IB. Now i want to change the my uitoolbar's (added programmatically) background similar to my navigation bar, programmatically. Obliged for any help in this regard. Sorry guys my bad it's actually navigation controller's toolbar. so this worked for me: self.navigationController.toolbar.tintColor=self.navigationController.navigationBar.tintColor; Thanks all of u guys for quick

UIBarStyleBlack vs tintColor black

主宰稳场 提交于 2019-12-07 03:14:49
问题 What is the difference between setting the tintColor property of UINavigationBar to [UIColor blackColor] and setting barStyle to UIBarStyleBlack on opaque navigation bar? 回答1: There are a few subtle differences. For example, on iPad, you get a matte style with the tint color, but a glossy one with the barStyle . Also, the color of bordered UIBarButtonItem s is slightly different; with the black barStyle , they are gray, which makes it easier to distinguish the darker highlighted state, while

How to change UIBarButtonItem's type in UINaviagationBar at runtime?

独自空忆成欢 提交于 2019-12-07 02:48:13
问题 I am working on an iPhone's view which composed 3 elements, UITextView, UIToolBar with an UIBarButtonItem. The goal is, I want UIBarButtonItem change its style from 'edit' (UIBarButtonSystemItemEdit) to 'Done' (UIBarButtonSystemItemDone) and update new selector to new method. First of all, I have tried following code but it doesn't work: Could you help me on this idea? 回答1: There is a builtin bar button with this behaviour, you get it via the editButtonItem property of a UIViewContoller.

How can i add a next and previous button at the segmented Controller on a navigation bar in iphone application development?

我怕爱的太早我们不能终老 提交于 2019-12-07 02:15:32
I am in great trouble....How can i set next and previous button/arrow at my segmented bar...if anyone need brief about my problem then please see this link... How can i add a next and previous button at the segmented Controller? i have attached an image to understand the problem...so anybody help me please.... NOTE THAT: In my current project it has more than 5 buttons to add at the segmented bar so when i will press next/previous arrow then segmented bar should be move from his place.If my question is not clear to you then please see my another link.... Thanks in Advance EDIT: UIBarButtonItem

UINavigationBar set custom shadow in AppDelegate.swift

放肆的年华 提交于 2019-12-07 02:06:06
问题 I want to set some shadow to the bottom of my UINavigationBar for the whole application. Here is what I've tried but it doesn't work: func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { UINavigationBar.appearance().layer.shadowOffset = CGSizeMake(0, 3) UINavigationBar.appearance().layer.shadowRadius = 3.0 UINavigationBar.appearance().layer.shadowColor = UIColor.yellowColor().CGColor UINavigationBar.appearance().layer

Navigation Bar Changes Height

送分小仙女□ 提交于 2019-12-06 19:50:28
When I push my UIViewController to the screen from my previous controller it animates the change. But when it finishes loading it resizes my navigation bar and the jumpy transition makes it look bad. How can I fix this? All I'm doing is hiding the navigation bar in Controller A in viewWillAppear and showing it in Controller B in viewDidLoad . Ok solved it. In viewDidLoad of Controller B (the view controller I'm pushing) add the following: UINavigationBar *navigationBar = self.navigationController.navigationBar; [navigationBar setBackgroundImage:[UIImage new] forBarPosition:UIBarPositionAny

How to change the font and text color of the title of UINavigationBar

大兔子大兔子 提交于 2019-12-06 18:22:01
问题 I want to be change the font of the title to Avenir, and I want to make it white. Here is my code in the viewDidLoad method: UINavigationBar.appearance().titleTextAttributes = [NSFontAttributeName: UIFont(name: "Avenir", size: 20)!] UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName: UIColor.whiteColor()] This code only changes the color of the title, not the font. Additionally, I tried implementing this in the App Delegate File, but that did not work. Here is

TabBarController in NavigationController does not show TabBar in viewControllers

狂风中的少年 提交于 2019-12-06 16:38:17
I have a UITabBarController to whose controllers I would like to attach navigation. So I inserted the NavigationController as the entry controller, and the tabBarController as its root. All seems working fine, but for the tabBar. Basically it does not show, albeit the StoryBoard I attach seems to say differently. I also attach the Account Screen not showing any navigation bar nor, of course, any back button. Thanks, Fabrizio Just a quick answer. I think you should put UINavigationController inside the TabBarController instead of the other way round. It will solve most of your problems. Steps:

Hide navigation bar in storyboard

北战南征 提交于 2019-12-06 16:33:12
问题 Can anyone tell me how to hide the navigation bar in my storyboard. My code below is working fine when running in the simulator but it still appears in my storyboard which is really annoying me as it's messing around with the placement of my images. Can anyone help? - (void) viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; [self.navigationController setNavigationBarHidden:YES animated:animated]; } - (void) viewWillDisappear:(BOOL)animated { [super viewWillDisappear:animated];