uinavigationbar

How to customize UINavigationBar in IOS5

六眼飞鱼酱① 提交于 2019-12-11 07:50:03
问题 In IOS5, I do not yet know how to customize UINavigationBar. My code is like this: [[UINavigationBar appearance] setBackgroundColor:[UIColor colorWithWhite:0.5f alpha:1.0]]; [[UINavigationBar appearance] setTitleTextAttributes:[NSDictionary dictionaryWithObjectsAndKeys: [UIColor blackColor],UITextAttributeTextColor ,[UIColor blackColor], UITextAttributeTextShadowColor ,[NSValue valueWithUIOffset:UIOffsetMake(0, 0)], UITextAttributeTextShadowOffset ,[UIFont fontWithName:@"Arial" size:20.0]

UINavigationbar barTintColor not working in UISplitview Template

不想你离开。 提交于 2019-12-11 07:48:15
问题 I am trying for hours to change the Navigationbar barTintValue in my App. I am using the Master-Detail Template from Xcode using Swift and I read a lots of questions here, but the answer was always to use navigationController?.navigationBar.barTintColor = UIColor.redColor() This works fine in AppDelegate, but I want to change the color in each DetailView depending on its content at runtime. When i put this code into the Master or DetailViewController just nothing happens. I printed out the

Navigation controller not displaying back button when same class is reused

ぐ巨炮叔叔 提交于 2019-12-11 06:48:31
问题 I'm doing a navigation based application. Let me explain a little bit about the application. At the program load table view will show 3 options like: Hotel Restaurants Cafe If a user selects any of the above options, it will navigate to another table view and show sub options. And it'll continue up-to 6 to 7 levels. So I in the didSelectRowAtIndexPath: of the tableView's class (Sales) I created it's own object and using [self.navigationController pushViewController:myViewController animated

Add the same UIBarButtonItem to several UIViewControllers

青春壹個敷衍的年華 提交于 2019-12-11 05:28:07
问题 I want to add the same UIBarButtonItem to several UIViewController s. I've done this previously by creating a parent UIViewController that manages to add the UIBarButtonItem s in viewDidLoad . But now I have many view controllers that inherit from different view controllers, so if I follow the same strategy I should create a UIViewController subclass for each one of the different view controllers. What I am actually doing is to configure the navigation bar buttons in my BaseViewController ,

Change width/height UINavigationBar embedded in a Navigation Controller?

拥有回忆 提交于 2019-12-11 04:50:20
问题 Constraints can be assigned to UINavigationBar that is added manually to the view. But when the UINavigationBar is added to a view when and the view is embedded in a Navigation Controller, I am not able to add constraints to the same. My objective is to increase the height of the UINavigationBar 回答1: UINavigationBar does not allow to assign constraints to itself. The only easy way that the height can be changed is by adding a space to the prompt property. To increase the the height of the

Change NavigationBar background on UIDocumentInteractionController

二次信任 提交于 2019-12-11 04:24:56
问题 I have to pass a local PDF file (documents directory) from UIWebView to other apps (iBooks, Facebook Messenger, WhatsApp, ...). So i use UIDocumentInteractionController: - (IBAction)shareButton:(id)sender { NSURL *url = [NSURL URLWithString:self.webView.request.URL.absoluteString]; self.docController = [UIDocumentInteractionController interactionControllerWithURL:url]; self.docController.delegate = self; [self.docController presentOpenInMenuFromBarButtonItem:sender animated:YES]; } If i

Landscape view issue with navigation bar

余生颓废 提交于 2019-12-11 03:27:02
问题 Default Navigation bar height is 64.But after change it's orientation to landscape navigation bar height changed to 28.I want to set Fix navigation bar size in all orientation. 回答1: You can add orientation observer: NotificationCenter.default.addObserver(self, selector: #selector(rotated), name: NSNotification.Name.UIDeviceOrientationDidChange, object: nil) And add rotate method: func rotated() { let height: CGFloat = 50 //whatever height you want to add to the existing height let bounds =

How to hide/show status bar and navigation bar by fading in/out at the same time like the Photos app in iOS 7?

杀马特。学长 韩版系。学妹 提交于 2019-12-11 03:19:12
问题 I'm trying to hide and show the status bar and the navigation bar by fading them in and out at the same time like the Photos app in iOS 7. I've got the hiding part working, but I am having trouble with the showing part. The problem is that when I show the navigation bar, it is initially positioned as if the status bar is not there. At the end of fading in, it is positioned correctly (it is shifted down to make room for the status bar). How can I get the navigation bar to be positioned

DocumentInteractionController Navigation Bar Color

蹲街弑〆低调 提交于 2019-12-11 03:06:29
问题 In my iOS application, I am using the DocumentInteractionController to preview the .csv document. self.documentController = [UIDocumentInteractionController interactionControllerWithURL:fileLocation]; [self.documentController setDelegate:self]; [self.documentController presentPreviewAnimated:YES]; However, I am finding that the navigation bar is completely transparent. The back button is white, so it is not visible due to the white background. Note that I have styled the navigation bar in the

respondsToSelector - not working

依然范特西╮ 提交于 2019-12-11 01:42:18
问题 I've read through like 10 posts, but haven't found what's wrong with my implementation. This app was written in iOS 6 but updated to iOS7, so I want to offer support for both iOS6 and iOS7. But if I run an iOS7-only method on an iOS6 device, it breaks. So I thought of adding respondsToSelector, to check it has iOS7 on it, but for some reason, the if always returns false. AppDelegate.m: if ([[UINavigationBar appearance] respondsToSelector:@selector(shadowImage)]) if ([[UINavigationBar