First method: Modify BASESDK
The default basesdk for XCODE5 is iOS7, so you have to modify the BASESDK when the project file is created. But XCODE5 only has the IOS7 SDK, so if you want to change the SDK, we'll add the old SDK.
1. Download the older version of Xcode from the Apple Developer Center,Https://developer.apple.com/downloads/index.action?name=Xcode
2. Extract the Iphoneos SDK and iphone Simulator SDK from the location where the path in the Xcode application package is contents/developer/platforms/iphoneos.platform/ Developer/sdks, the latter is Contents/developer/platforms/iphonesimulator.platform/developer/sdks.
3. Assuming we have installed XCODE5, we find Xcode.app in the application right-click to display the contents of the package Contents/developer/platforms/iphoneos.platform/developer/sdks The path is opened and the extracted Iphoneos SDK is copied in. The same is the copy of the Emulator SDK.
4. Restart Xcode, this time you can set up the base SDK
5. If set to IOS6, then the application even on the device running IOS7 is the iOS6 feature. For example, if the keyboard that pops up when the application needs input is iOS6 style, it's not iOS7 style.
6. Refer to http://github.kimziv.com/blog/2013/09/22/how-to-use-older-base-sdks-in-xcode5/
The second method: manual code sets the frame for each UI component
1. Determine the current device's system
#define IOS7 ([[[Uidevice currentdevice]systemversion] floatvalue] >= 7.0)? Yes:no
2. Then set frame according to different system
Third method: Change window
1. You need to add the key: Uiviewcontrollerbasedstatusbarappearance in the Info.plist configuration file, and set to Yes
2. In the APPDELEGATE.M
-(BOOL) Application: (UIApplication *) application didfinishlaunchingwithoptions: (Nsdictionary *) launchOptions;
Add to
Fourth method: Write code in each uiviewcontroller. m file (recommended)
It is recommended to use this method
In IOS7, the Uinavigationcontroller interface is not used relative iOS6 will move up 20px, using the 64px will move up. Simply put, the navigation bar and the status bar will overwrite the following pages by default, and you can avoid them by using the following method
if ([[[[ Uidevice currentdevice]systemversion]floatvalue]>=7.0] {
Self.edgesforextendedlayout = Uirectedgenone;
}
The problem of iOS7 interface moving up