请告诉我,如何在我的XCode 4.6中为iOS5创建项目,其中所有版本都适用于iOS6
我改变了部署目标
以及如何更改基础SDK?或许我不能改变它?
我必须做的是,如果我尝试使用只能在iOS 6中使用的方法,我的XCode会向我显示警告吗?
First you should understand a few things. Deployment target is the minimum OS version that your app supports. If you set into iOS 5.0 you can assure that it’s support iOS 5.0 and above. Base SDK is the SDK which is used to compile your application. Always use latest SDK available.
If you want to create app that support iOS5.0 and above set deployment target as 5.0. Then use latest SDK available. The reason is that if you change base SDK to some lower version,your app may not support ios6 since some of the methods are deprecated in iOS6. If you compile it with latest SDK it shows warning. You can test your app by installing different simulators to check wether it is working properly. Mainly you need to handle orientation issues since it is different in both.
您可以使用条件编译.切记不要使用autoLayout和属性字符串.哪个不支持ios5