保持向后兼容性iOS7 [英] Maintaining Backward compatibility iOS7
问题描述
这个问题可能听起来很愚蠢,但我想这可能是许多开发人员感兴趣的问题。
推出Xcode-5&开发针对iOS7,如何保持向后兼容性以使应用程序在旧版本的iOS上正常运行?
The question might sound silly but I guess it may be a matter of interest for many developers. With the launch of Xcode-5 & development being targeted to iOS7, how do I maintain backward compatibility to make the app run properly on older versions of iOS ?
我看到了的UINavigationController
的布局。在导航栏可见的情况下, CGRectMake(0,0,50,50)
将在Navigationbar之后的左上角,但现在在iOS-7中,它落后了。我知道修复此问题的解决方案这里,但是当新引入此功能时,旧版本的效果如何。
I see the big challenge with UINavigationController
layout. With Navigation bar visible, the CGRectMake(0,0, 50, 50)
will take the upper left corner just after Navigationbar but now in iOS-7, it goes behind. I know the solution to fix this here, but how the same can work for older version when this feature is newly introduced.
我还需要哪些其他地方来弥补这一差距(向后兼容性)
What else places do I need to bridge this gap (the backward compatibility)
推荐答案
在手动布局中使用 viewController.topLayoutGuide.length
而不是0,见这里。
Use viewController.topLayoutGuide.length
instead of 0 in manual layout, see here.
这篇关于保持向后兼容性iOS7的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!