在XCode中,我可以指定Base SDK.我想知道幕后工作是怎么做的?如果我正在运行应用程序,例如,在具有iOS 7且我的基础SDK是iOS 6的设备上,那么应用程序为何具有旧的“外观和感觉”? XCode是否编译了较旧的SDK并将其包含在我的应用程序中,或者新版本的iOS是否附带较旧的库/ SDK?
换句话说,运行时是否知道这个应用程序是使用较低的基础SDK编译的,并且在UIKit的代码中的某处:
if (lower SDK) { //show old look/feel } else { //show new look/feel }
或者应用程序本身是否包含旧库并加载它?
谢谢
解决方法
iOS应用程序与新版iOS正向兼容.原因是 :
Almost all changes to the iOS versions are additive and hence an
application build using lower version still runs on the higher iOS
version.
但是,我们需要注意这一点:
As frameworks evolve through varIoUs releases,APIs are introduced or
deprecated and behaviors of existing APIs may occasionally change.
Apple makes every effort to minimize changes that may cause
incompatibilities,in some cases providing alternate behaviors based
on the framework version. In rare cases,your code needs to determine
the framework version and adjust accordingly
要了解更多信息,请阅读this