uinavigationbar

Navigation bar show/hide

删除回忆录丶 提交于 2019-12-17 08:00:35
问题 I have an app with a navigation bar consisting of 2 bar buttons. I would like to hide and show this navigation bar when a user double taps the screen. Initially, the navigation bar should be hidden. When a user double taps the screen, the navigation bar should come up with an animation, like what can be seen in the iPhone's photo gallery. How can i do something this? Suggestions are always appreciated. 回答1: This isn't something that can fit into a few lines of code, but this is one approach

How to enable back/left swipe gesture in UINavigationController after setting leftBarButtonItem?

回眸只為那壹抹淺笑 提交于 2019-12-17 07:10:29
问题 I got the opposite issue from here. By default in iOS7 , back swipe gesture of UINavigationController 's stack could pop the presented ViewController . Now I just uniformed all the self.navigationItem.leftBarButtonItem style for all the ViewControllers . Here is the code: self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithImage:LOADIMAGE(@"back_button") style:UIBarButtonItemStylePlain target:self action:@selector(popCurrentViewController)]; after that, the

How can I change the font of the back button for my navigation bar?

天涯浪子 提交于 2019-12-17 06:35:36
问题 How can I change the font of the back button for my navigation bar. The back button is either "back" or the title from the previous view controller. I thought this viewDidLoad would work: navigationController?.navigationItem.leftBarButtonItem?.setTitleTextAttributes([NSFontAttributeName: UIFont(name: "FONTNAME", size: 20)!], forState: UIControlState.Normal) but the leftBarButton? optional returns nil . 回答1: Just tested your code and it seems the reason that line is returning nil is actually

How to add Badges on UIBarbutton item?

假装没事ソ 提交于 2019-12-17 06:24:26
问题 Hi friends am new to iphone developing. Am struggle with add badge values on UIBarbutton item on right side. I have tried but i can't solve this problem. Can anyone help me. Thanks in advance! 回答1: I know this post is pretty old but with iOS7, MKNumberBadgeView's appearance does not really match the tab bar item badge design. I have found this other component which herits UIBarButtonItem and do the job very well : https://github.com/TanguyAladenise/BBBadgeBarButtonItem Hope this may help

Achieving bright, vivid colors for an iOS 7 translucent UINavigationBar

前提是你 提交于 2019-12-17 04:09:35
问题 iOS 7.1 UPDATE : Looks like the workaround for modifying the alpha channel in the UINavigationBar has been ignored in this update. Right now, the best solution seems to be to just 'deal with it' and hope that whatever color you choose can render a translucent effect. I am still looking into ways of getting around this. iOS 7.0.3 UPDATE : The GitHub library we created has been updated to slightly work around this issue when using iOS 7.0.3. Unfortunately, there is no magic formula to support

Achieving bright, vivid colors for an iOS 7 translucent UINavigationBar

那年仲夏 提交于 2019-12-17 04:09:09
问题 iOS 7.1 UPDATE : Looks like the workaround for modifying the alpha channel in the UINavigationBar has been ignored in this update. Right now, the best solution seems to be to just 'deal with it' and hope that whatever color you choose can render a translucent effect. I am still looking into ways of getting around this. iOS 7.0.3 UPDATE : The GitHub library we created has been updated to slightly work around this issue when using iOS 7.0.3. Unfortunately, there is no magic formula to support

Navigation controller simply with Swift?

时光总嘲笑我的痴心妄想 提交于 2019-12-16 18:03:31
问题 I have 3 view controllers I load from story board : controller1 = storyboard.instantiateViewController(withIdentifier: "ViewController") as! ViewController controller2 = storyboard.instantiateViewController(withIdentifier: "ModelController") as! ModelController controller3 = storyboard.instantiateViewController(withIdentifier: "BuyController") as! BuyViewController I would like to create, and load these 3 controllers into a bottom navigation bar with 3 buttons. Programmatically . How would I

IOS/Objective-C: Custom Segue Effect on Navigation Bar Compared with Show Segue

二次信任 提交于 2019-12-14 04:06:05
问题 I have two view controllers where I use a regular Show Segue (Right to Left) to go in one direction and a custom segue (Left to Right) to go in the other direction. I don't think I should do an unwind because neither VC is subordinate to other and using these segues means one navigation controller manages things. In the upper left hand corner of both VCs I have a common BarButton containing a profile photo. When using the regular Right to Left Segue, the profile photo on the bar button

controlling display coordinates of view item added to toolbar

萝らか妹 提交于 2019-12-13 21:23:29
问题 I want to have precise control over the custom view I add to my UINavigationController toolbar. More specifically.. i want to display a UILable ontop of the items in my toolbar. I have a toolbarItems initially set up with some UIBarButtonItems . The effect I'm trying to achieve is programmatically expand the height of the toolbar, and then display a UILabel ontop of the rest of the buttons.. this is what I currently have: -(void)expandToolBar:(NSString *)title { UIToolbar* toolBar =self

How to test apps for iOS 11 on an older xCode version than 9

让人想犯罪 __ 提交于 2019-12-13 20:29:39
问题 After updating my xCode to be version 9.0, I'm facing an issue with the custom navigationBar, the status bar and navigation bar are colliding which was addressed here as a bug from xCode... My question is: how can build my project for iOS 11 too with an older version so I wouldn't have this issue? Thank you! 回答1: Originally modified from this answer. Follow these steps: Close/Quit Xcode 8 (or any of 8.. series) completely. Download Xcode 9 from Apple site (if you have done this already,