Question

What is the best practice for selecting the correct navigation bar background image depending on the iOS version?

As I understand it, the image should be a height of 64px for iOS7 and 44px for iOS6. Is it simply a matter of checking the iOS version running and then choosing the appropriate image (in an if statement)? Is there a way to do it in interface builder? Or better yet, is there a way to have iOS select the correct image automatically (based on the file name, etc.)?

Was it helpful?

Solution

Yes, use a different image for each version. You check check for iOS 6 with

NSFoundationVersionNumber > NSFoundationVersionNumber_iOS_6_1

Apple alludes to this solution in their iOS7 transition guide

https://developer.apple.com/library/ios/documentation/userexperience/conceptual/transitionguide/Bars.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top