Navigation Bar doesn't alway vertically center buttons and title text in the bar? - uinavigationbar

I am upgrading an app from iOS 12 to iOS 14.5. The app has a navigation bar. When I run it in the Simulator on an iPhone SE (2nd gen), 8, 8+ or iPod (7th gen) the navigation bar correctly displays the buttons and title text as vertically centered in the bar. However when I run it in the simulator on any iPhone 11, 11 Pro, 11 Max, 12, 12 Mini, 12, 12 Pro, 12 Pro Max the navigation bar displays the buttons and title text at the bottom of the navigation bar?
See the 2 example images below.
I can implement:
func setTitleVerticalPositionAdjustment(_ adjustment: CGFloat,
for barMetrics: UIBarMetrics)
but that doesn't affect the navigation buttons, plus it knocks the title text out of vertical center for iPhone SE, 8, 8+ and iPod, and the compiler complains about "Unable to simultaneously satisfy constraints."
Implementing:
func setBackgroundVerticalPositionAdjustment(_ adjustment: CGFloat,
for barMetrics: UIBarMetrics)
doesn't affect the vertical centering of the navigation bar buttons.
Any help would be appreciated!

Related

Bottom border line behind navigationBar dont show in iPhone X

I have this problem. I´m working with Xcode 9 and Swift 3. The navigation bar in navigation controller has Translucent check to true. But...
In iPhone 7 simulator the border line behind navigation bar show perfectly but in iPhone X simulator, this line don't show.
Anybody know how resolved it?

UIBarButtonItem's TintColor incorrectly grey on iPhone 5C, but correctly white on 4S, 6, and all Simulator options. Why?

The top Nav Bar seen in the image attached is what I see on my iPhone 4S, my iPhone 6, and all instances of the Simulator (4S, 5, 5S, 6, 6+).
However, when I run on my iPhone 5C, I get the bottom Nav Bar seen in the image attached. The top left BarButtonItem is a custom image. The top right is the default "Add" button.
Go to your iphone/ipad settings General > Accessibility > Increase Contrast > Darken Colors = OFF

Launch screen view is misaligned in iOS 8 when having large status bar

Why does the launch screen view get misaligned in iOS 8 when running the app with an enlarged status bar? See the attached image for details:
The launch screen view seems to be cropped/resized from bottom by 20 pixels
The Home screen background shows underneath (the red arrow)
The LaunchScreen.xib has auto layout enabled and Info.plist has the following settings:
Status bar is initially hidden: NO
View controller-based status bar appearance: NO
Status bar style: UIStatusBarStyleLightContent
I'm using Xcode 6.3.1 (6D1002) and running the application in iPhone 6 with iOS 8.3.

update tab bar height in iOS 7/8 from iOS 6 - UITabBar

I am updating an app that was written for previous iOS (5/6). I have updated the icons for the tab bar; according to the Apple requirements (Icon and Image Sizes) they are 50x50p for all devices except the iphone 6 plus. Unfortunately also my tab bar is 49 pixels in height (keep still the iOS6 size) and the icons cover its entire space. This tab bar (UITabBar) was created in the Interface builder but I am not able to change "size inspector" values.
iOS 6/7 Deltas values don't do anything.
I have setted the Deployment Target to iOS 7.1 and Base SDK to 8.0
How can i change/increase the tab bar height like in iOS 7/8?

iOS 8 iPad tab bar height is different than iOS 7

Does any one know if the official documentation tells us the height of the tab bar on iOS 8 iPad applications?
My app's tab bar frame is (0, 719) (1024, 49) on my landscape iPad app on iOS 8.
For iOS 7, it's (0, 712), (1024, 56).
I read in https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/TransitionGuide/Bars.html that the height on iOS 7 ipads is 56 pixels. I'm guessing it's not the same for iOS 8?
Apple have changed the iPad tab bar height back to 49pt in iOS 8. An Apple engineer has confirmed the change. The documentation seems to have not updated however.
So for iPad, the UITabBar heights per iOS version are:
iOS 6 and earlier - 49pt
iOS 7 - 56pt
iOS 8 and later - 49pt
The tab bar has always been 49pt on iPhone and remains that way.
You can get the size of the tab bar programmatically instead
tabBarController?.tabBar.bounds.size

Resources