uinavigationbar

iOS Custom Status Bar Background Color not displaying

99封情书 提交于 2019-11-29 03:30:53
I am trying to fill the status bar background color to orange using the following UINavigationBar.appearance().tintColor = UIColor.orangeColor() UINavigationBar.appearance().barTintColor = UIColor.orangeColor() UINavigationBar.appearance().titleTextAttributes = [NSForegroundColorAttributeName: UIColor.whiteColor()] UIApplication.sharedApplication().setStatusBarStyle(UIStatusBarStyle.LightContent, animated: true) However, I get a white status bar that should be filled with orange instead from following this example: Customize navigation bar appearance with swift I am setting this up in the

iPhone: UINavigationBar with buttons - adjust the height

爱⌒轻易说出口 提交于 2019-11-29 03:24:26
问题 I am working on an iPhone application which works in both orientations: portrait and landscape. I am using for one view and tableview embedded in an UINavigationController. The height of this navigationbar with its buttons is either: 44px portrait or 34px landscape. Within a different view I created the UINavigationBar by myself and I am able to set the frame for the correct size, but the embedded UINavigationItem with UIBarButtonItem doesn't shrink. So for the 34 px in the landscape mode

How to make navigation bar transparent in iOS 7? [duplicate]

佐手、 提交于 2019-11-29 02:17:41
问题 This question already has an answer here: How to draw a transparent UIToolbar or UINavigationBar in iOS7 5 answers Is there a way to make the bar of a navigation controller totally transparent? What i've tried: [self.navigationController.navigationBar setBackgroundColor:[UIColor clearColor]]; [self.navigationController.navigationBar setBarTintColor:[UIColor clearColor]]; [self.navigationController.navigationBar setAlpha:0.0]; but the bar's appearance does not change, and stays white

Button color in Navigation bar - iPhone

大城市里の小女人 提交于 2019-11-29 02:04:48
How do you to set the tint of this yellow button to be gray? I have tried adding an image, but have had no luck. Here is the screenshot: Here is my current code: - (id)initWithStyle:(UITableViewStyle)style { if (self = [super initWithStyle:style]) { UIBarButtonItem *addButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"Settings", @"") style:UIBarButtonItemStyleDone target:self action:@selector(GoToSettings)]; [addButton setImage:[[UIImage imageNamed:@"bg_table.png"] retain]]; self.navigationItem.rightBarButtonItem = addButton; self.navigationItem.hidesBackButton = TRUE; self

How can I change the background image for my NavigationBar on a per page basis?

你说的曾经没有我的故事 提交于 2019-11-29 01:57:12
问题 I've been looking around for a way to change the background image of my NavigationBar and control the appearance of my NavigationBar as the user navigates the app. I understand that the accepted approach for changing the background image is : @implementation UINavigationBar (UINavigationBarCategory) - (void)drawRect:(CGRect)rect { UIImage *image = [UIImage imageNamed: @"navbar.png"]; [image drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; } @end However, that

Objective C: How to add Shadow effect to navigation bar and table cells [duplicate]

主宰稳场 提交于 2019-11-29 01:30:27
问题 Possible Duplicate: How to use Quartz 2D to add drop shadow to an UIImage or UIImageView ? Hi, I have created a tableViewController and want to try to add the shadow effect for both the navigation bar as well as the table cells. Can anyone guide me on the approach to do so? Thanks! Zhen Hoe 回答1: try this yourView.layer.shadowColor = [[UIColor blackColor] CGColor]; yourView.layer.shadowOffset = CGSizeMake(1.0f, 1.0f); yourView.layer.shadowRadius = 3.0f; yourView.layer.shadowOpacity = 1.0f; You

How to add a navigation controller programmatically in code but not as initial view controller

吃可爱长大的小学妹 提交于 2019-11-29 01:13:16
问题 I am relatively new to swift and iOS and can't find an answer or any help for my problem that works. I want to create a navigation controller view when I click on a button in my previous view. My previous view is an on-boarding with a button on the last page. I successfully connected the button to my next view but I am not able to make the view act like a navigation controller. For example, when a navigation bar is displayed, I am not able to add navigation items to it. Is there a way to set

UIStatusBar as in Facebook new iOS7 application

倾然丶 夕夏残阳落幕 提交于 2019-11-29 01:11:47
问题 I have an app with side bar menu, kinda like Facebook side bar menu. I'm using this class called SWRevealViewController and it's working great. Now since iOS7 has came out, I just can't figure out how to adjust my Status and Navigation Bar to be like in Facebook app. As you can see, in the Facebook app, when the user slides the screen and open's the menu, the status bar turn from the Navigation Bar blue color to black with Fade animation. In my app, the user slides the screen to open the menu

How to remove UINavigationBar and UISearchBar hairline

帅比萌擦擦* 提交于 2019-11-29 00:38:44
I am creating an iOS 7 app in which I'd like to have a SearchBar right bellow the NavigationBar, and I wanted them both to look like a single piece. Therefore I need to tint them with the same color (done already) and remove that hairline at the bottom of the NavigationBar and at the top of the SearchBar. How can I achieve that? Officially, this is only possible by setting the shadowImage of the navigationBar to an empty image. However, a closer look at the documentation, it is said: For a custom shadow image to be shown, a custom background image must also be set with the setBackgroundImage

Set navigation bar image in iOS 7

拜拜、爱过 提交于 2019-11-28 21:28:57
I want to convert my current project from iOS 6 to iOS 7. In iOS 6 my project is working fine, but in iOS 7 navigation bar image is not showing properly. I used this code snippet for iOS 6, UIImage *imgNav = [UIImage imageNamed:@"navigation.png"]; self.navigationController.navigationBar.frame = CGRectMake(0, 0, 320, 44); [self.navigationController.navigationBar setBackgroundImage:imgNav forBarMetrics: UIBarMetricsDefault]; How can I set the navigation bar image in iOS 7? iCoder Try Adding the below code in AppDelegate [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@