質問

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.)?

役に立ちましたか?

解決

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

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top