uinavigationbar

UINavigationBar frame height returns 44.0 but is actually 64.0

回眸只為那壹抹淺笑 提交于 2020-01-02 10:20:00
问题 I have a UINavigationController in a storyboard which is not using AutoLayout. With the status bar visible the actual height of the UINavigationBar is 64.0 and yet when I log self.navigationBar.frame.size.height I get 44.0. How do I get the actual height of the UINavigationBar? I'm using Xcode 7.3 and the storyboard builds for iOS 6. 回答1: The height of the UINavigationBar is 44 . The reason you´re getting 64 is because of your status bar is visible and it has a height of 20 . Update: To

Remove space before left button on Navigation bar in IOS7?

最后都变了- 提交于 2020-01-02 09:53:48
问题 I can implement navigation bar and add left bar button, but before left button have space, please ask how to remove this space in ios 7. 回答1: use this it will work i have used it and works fine on iOS 7 also UIBarButtonItem *homeButton = [[UIBarButtonItem alloc] initWithCustomView:segmentView]; UIBarButtonItem *negativeSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil]; negativeSpacer.width = -6;// it was -6 in iOS 6 you can

Remove space before left button on Navigation bar in IOS7?

☆樱花仙子☆ 提交于 2020-01-02 09:53:06
问题 I can implement navigation bar and add left bar button, but before left button have space, please ask how to remove this space in ios 7. 回答1: use this it will work i have used it and works fine on iOS 7 also UIBarButtonItem *homeButton = [[UIBarButtonItem alloc] initWithCustomView:segmentView]; UIBarButtonItem *negativeSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil]; negativeSpacer.width = -6;// it was -6 in iOS 6 you can

iOS7 Facebook NavigationBar Behavior

六眼飞鱼酱① 提交于 2020-01-02 05:34:09
问题 My App has more or less the same navigation concept as Facebook's / Instagram's iOS7 Apps: A ContainerViewController with 5 tabs, each of which has a NavigationController as it's rootViewController. I'm now trying to reproduce Facebook's navigationBar behavior for the rootViewController of the first tab's navigationController (-> the first 'real' VC, not just a container like NavVC). I was able to implement a hiding/showing navigationBar using the UIScrollView Delegate methods

UINavigationBar with buttons as title.

牧云@^-^@ 提交于 2020-01-02 01:16:07
问题 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

Change colour of back bar button item only in swift

余生颓废 提交于 2020-01-01 21:59:23
问题 I am trying to change the colour of the back bar button item in swift navigation bar. Ultimately I aim to make something line this for the navbar: This is my current code which gives me three back arrows as the back button item but how do I change the colour so it is three different colours in one bit of text? (Green, Yellow, Red). func setCustomBackImage() { navigationItem.backBarButtonItem = UIBarButtonItem(title: "<<<", style: .plain, target: nil, action: nil) } 回答1: There is a much more

Custom animation when hiding UINavigationBar

為{幸葍}努か 提交于 2020-01-01 15:07:41
问题 I'm making an application which shows/hides (in custom animation) the UINavigationBar on single tap. I have created two functions (one for showing and the other for hiding). The function for showing the UINavigationBar works perfectly: - (void) showNavigationBar { [UINavigationBar beginAnimations:@"NavBarFadeIn" context:nil]; self.navigationController.navigationBar.alpha = 0; [UINavigationBar setAnimationCurve:UIViewAnimationCurveEaseIn]; [UINavigationBar setAnimationDuration:0.5];

iPad SplitView changes main navigation bar color

徘徊边缘 提交于 2020-01-01 11:57:51
问题 Weird problem: After rotating my app to portrait, picking the toolbar item and exposing the uipopovercontroller, if I rotate back to landscape, the UINavigationController on the right side (objectAtIndex:0 of the SplitView) changes the color of the navigation bar. I am not sure why. I have it set in Interface Builder to be barStyle = UIBarStyleBlackOpaque; It turns silver after it returns to landscape mode. This only happens if I rotate it to portrait, create the popover, and select something

No top navigation bar in a tab bar controller application

两盒软妹~` 提交于 2020-01-01 10:28:21
问题 I'm pretty new in iphone programming and have stumbled upon this issue which I guess should be pretty basic stuff. I am using a tab bar application created from a template in XCode IOS 5.1. It works fine and creates 3 screens in the storyboard (tab bar controller + + 2 descended views) but when I try adding a top bar to these 2 views there is a problem... I do this by adding the top navigation bar in interface builder from object inspector for the tab bar controller. After ticking this option

adding progress bar under navigation bar

孤街浪徒 提交于 2020-01-01 09:48:09
问题 I am new to iOS development. I would like to know if in iOS 7 when sending a message under UINavigationBar , which has a title called : Sending, there is a progress bar that is loading till the message is successfully sent. My question is: Is that bar a progress bar? In iOS 6, the progress bar is inside the UINavigationBar ? Can someone give me some ideas about how to create this on iOS 7 and iOS6? I haven't yet tried anything. I would like to read some tutorials or examples with this type of