uinavigationbar

iOS UINavigationBar tint color appears darker than color set

末鹿安然 提交于 2019-12-04 05:09:10
I am setting a custom appearance for a specific navigation controller: //Set Cutom Nav Bar Appearance [[UINavigationBar appearanceWhenContainedIn:[MyNavigationControllerClass class], nil] setBackgroundImage: nil forBarMetrics: UIBarMetricsDefault]; [[UINavigationBar appearanceWhenContainedIn:[MyNavigationControllerClass class], nil] setBarTintColor: self.tableView.backgroundColor]; When the navigation controller is displayed, the expected color is RGB(247, 247, 247) - which I have double checked is also the value of the tableView.background color when the value is set - but it appears on

Navigation bar in iOS 6 look like bar in iOS 7

吃可爱长大的小学妹 提交于 2019-12-04 04:52:12
Is there any way to make navigation bar elements (back button) in iOS 6 look like navigation bar elements in iOS 7 ? And also buttons and other iOS 7 elements of UI. Instead of putting code into every view controller that you need to customize, I would recommend doing this for the entire application by putting something like this in your application:didFinishLaunchingWithOptions: method in the App Delegate // Nav bar [[UINavigationBar appearance] setBackgroundImage:[[UIImage imageNamed:@"navBar.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(10, 5, 10, 5)] forBarMetrics:UIBarMetricsDefault]

Navigation bar not appearing?

五迷三道 提交于 2019-12-04 04:16:19
I am currently using a form building library called Eureka( https://github.com/xmartlabs/Eureka ) and for some reason whenever I build a form,the navigation bar is not appearing eventhough my view controller is embedded in a navigation controller and it is set to visible.Any help? Here's my repo: https://github.com/ariff20/iTutor Code class SignUpViewController: FormViewController ,UINavigationBarDelegate{ override func viewDidLoad() { super.viewDidLoad() let logButton : UIBarButtonItem = UIBarButtonItem(title: "RightButtonTitle", style: UIBarButtonItemStyle.Done, target: self,action:

How to add UISearchBar to NavigationBar through the storyboard in iOS

允我心安 提交于 2019-12-04 03:49:01
问题 I find what seems like an elegant answer to this question at How to add search bar in navigation bar for iPhone (one question-one answer: very short so please look). I like the piece about doing it in the storyboard (aka IB): i.e. "create an outlet from the NavigationBar titleView to the SearchBar in IB". But where would I place the SearchBar on the storyboard? Here is what I did: I dropped the SearchBar in my TableView header Then from NavigatorBar I point outlet to the SearchBar as

How to prevent Large Title from Collapsing

做~自己de王妃 提交于 2019-12-04 03:30:25
The question is simple, how can I prevent a Large Title Navigation Bar from collapse when a scrollview scrolls down? My navigation must have a large navigation bar at all times... so when a scrollview scroll, the navigation bar shouldn't collapse up, it should stay the same size, how can I do that? This is how I set the largeTitle preferences override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) self.navigationItem.hidesBackButton = true presenter.expandForSimulatorLayoutIfNeeded() } func expandForSimulatorLayoutIfNeeded(){ if !isExpanded{ topMenu = TopMenu(frame:

Glitchy animation of UIRefreschControl with large titles for navigation bar

China☆狼群 提交于 2019-12-04 03:23:07
I have a controller embedded in a navigation controller with Large Titles and a UIRefreshControl. When I pull-to-refresh on my tableView, the animation of the activity indicator is very glitchy. I don't know if I have a bad behaviour in my code ? tableView.refreshControl = UIRefreshControl() tableView.refreshControl?.addTarget(self, action: #selector(downloadData), for: .valueChanged) Li Sim If your have set your navigation bar translucency appearance to false, then you need to include the following code in your view controller to handle opaque bars. Also, in storyboard, the tableView has to

Unable to dismiss CNContactViewController

喜欢而已 提交于 2019-12-04 03:17:22
I'm trying to let the user create a new contact. While I've got the screen to prompt the user to put in all his details there is no navigation bar at the top(Like there is in the default Apple Contacts app). There is no way to exit the scene. I'm using the ContactUI framework in swift 2.0 and Xcode 7.3. Here's the code: // create a new contact let createNewActionHandler = {(action: UIAlertAction) -> Void in let newContact = CNMutableContact() let contactPicker = CNContactViewController(forNewContact: newContact) contactPicker.delegate = self contactPicker.navigationController?.setToolbarHidden

large Navigation Bar backGround gets clear color when swiping back to root viewController

て烟熏妆下的殇ゞ 提交于 2019-12-04 02:39:24
Hey guys i've used largeNavigationBar and it's ok until i swipe back to root view controller and large navigation gets clear color in a nasty way. here's the code: func largeNavigationTitle() { self.navigationController?.view.backgroundColor = VVUtility.navigationBarColor() let productTitle = request?.product?.name self.navigationItem.title = "\(productTitle ?? " ")".localized() self.navigationController?.navigationBar.titleTextAttributes = [NSAttributedStringKey.foregroundColor : UIColor.white, NSAttributedStringKey.font : VVUtility.normalFontWithPlusSize(increaseSize: -2.0)] if #available

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

二次信任 提交于 2019-12-04 02:27:51
问题 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

How do I add UIImage to center of UINavigationBar?

≯℡__Kan透↙ 提交于 2019-12-04 02:19:56
My problem is that I have an image with width = 44 and height = 44 . This method didn't work properly. [self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"image_44.png"] forBarMetrics:UIBarMetricsDefault]; How do I add an UIImage to center of an UINavigationBar ? Try this: UIImageView *titleView = [[UIImageView alloc] initWithImage:myUIImage]; [self.navigationItem setTitleView:titleView]; Using Swift : var titleView = UIImageView(image: UIImage(named: "nameOfTheImage.ext")) self.navigationItem.titleView = titleView 来源: https://stackoverflow.com/questions/8506679