uinavigationbar

How to implement menu in iOS like Android

为君一笑 提交于 2019-12-05 02:20:28
问题 I need to implement menu for iOS like android.menu means button on navigation bar(right side) . If I click that menu will display. I am using a storyboard. 回答1: So you want something like this: Even works in landscape: I think it's going to take forever for me to explain :D Basically I created a custom UINavigationController as mentioned in the comments above, called it ActionBarNavigationController From this custom UINavigationController, I added a custom UIView to display the ActionBar with

UINavigationBar with buttons as title.

半城伤御伤魂 提交于 2019-12-05 01:20:50
I have done some digging and can't seem to get anything useful. What I am trying to do is pretty basic but I'm not sure if their is: 1. An easier way 2. Or if Apple will give it a "no no" I have a view that is controlled via UINavigationController (obviously from the title of this post) and in it has an object/view. The view is fairly congested already with content. Not really congested but no more room to fit things comfortably. The user needs to be able to rate this object by using a different number of starts (1-5). The ideal way I would see this happening would be to have 5 star buttons

How to change the text of a BarButtonItem on the NavigationBar?

℡╲_俬逩灬. 提交于 2019-12-05 01:07:44
I am trying to create a list of items that can be edited. Something like this: To that end, I added a NavigationBar to the top of the view, then added 2 Bar Button Items in XCode designer. I set the identifier for the button on the left to Add, for the button on the right to Edit. When I click the Edit, I want to change the text to Done. I've tried various ways, e.g. btnEdit.Title = "Done" , but it simply doesn't take. I've seen several blog posts recommending .SetTitle, but UIButtonBarItem doesn't have that method (at least in MonoTouch). So, how can I change the title of the Edit button? I

How to change the uinavigationbar title's position?

雨燕双飞 提交于 2019-12-05 00:13:23
问题 I've managed to change the navigationbar height by using my own navigationbar, but the title is still centered. I want it to be at the 72px position from the left. override func sizeThatFits(size: CGSize) -> CGSize { return CGSizeMake(UIScreen.mainScreen().bounds.width, 56) } I used this to change the height but I didn't find a way to change the position of all the items. I tried to set the frame but I can't. I can't change the position of the button too. i wanna look like this 回答1: Create a

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

≡放荡痞女 提交于 2019-12-04 23:52:48
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 what my UINavigationBar looks like: I want the title to have a font of Avenir as well. How do I achieve

Hide navigation bar in storyboard

时光怂恿深爱的人放手 提交于 2019-12-04 22:15:57
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]; [self.navigationController setNavigationBarHidden:NO animated:animated]; } Click on the controller that

How to prevent view resizing/transform when UINavigationBar hides/shows

跟風遠走 提交于 2019-12-04 21:29:07
问题 I have an application with a tab bar and a navigation bar. I push a view controller that is used to show photos, one at a time. It initially shows the bars and forward/back controls; after a delay, these hide, using setNavigationBarHidden:animated: and a custom transform ( CGAffineTransformMakeTranslation ) on the tab bar. This works, but the view controllers view , which shows the photo, leaps up and down. The same is true if I leave the tab bar out of the equation. How can I prevent the

Make UINavigationBar title editable

流过昼夜 提交于 2019-12-04 19:42:12
I'd like to implement such feature in my project. It is just like changing title of UINavigationBar in Interface Builder. It's not a problem in terms of programming (maybe adding shadow to UITextField text is a little challenge, but not that big). My question is: is it in compliance with App Store Review Guidelines & Human Interface Guidelines ? Do you know such apps in App Store, or have you submitted such apps to App Store by yourself? Thank you. iA Writer does this in their iPad and iPhone version. 来源: https://stackoverflow.com/questions/9920520/make-uinavigationbar-title-editable

How to Add UIImageView with UILabel in navigation bar of iphone?

烂漫一生 提交于 2019-12-04 19:33:17
I have some navigation bar in my UI of iphone app. Now i want to add two images on the navigation bar on center of the navigation bar.. I have successfully added the two UIImageView on the navigation-bar but my problem is that i have two UIImageView with the label on it .. Let me show u the snapshot ... now my problem is i don't know how to add this kind of label near UIImageView in navigation bar..so please if anyone can guide me for this then it will help me a lot.. i have already successfully inserted two images on navigation bar with this Code. UIImageView *Messageview = [[UIImageView

Remove 1px line at top of UISearchController in large titles UINavigationBar

一曲冷凌霜 提交于 2019-12-04 19:09:39
问题 I'm transitioning from a view with a large style UINavigationItem into a view that has a large style UINavigationItem and a UISearchController . I've customized the background colour of the UINavigationBar . For some reason, there's a 1px line or space between the UINavigationBar and the UISearchController . I can tell it's from the NavigationBar , because if I scroll so that the search bar sticks to the top, the line disappears. I'm just not sure what's generating this line. I'm not using