Supporting iOS 4.3 to iOS 6.0(支持 iOS 4.3 到 iOS 6.0)
问题描述
我已经有了支持ios 4.3到ios 5的基础代码,现在我也想支持ios 6.0.目前的基本代码有modal views,硬编码CGRect's,每个视图的旋转是不同的.所以我想知道我们是否可以通过相同的基本代码支持 ios 4.3 到 ios 6.0,只需调整一些更改,还是我们需要创建一个完整的新目标?
I already have the base code that supports ios 4.3 to ios 5. Now I would also like to support ios 6.0.
The present base code has modal views, hard coded CGRect's, and rotation is different for each view. So I would like to know whether we can support ios 4.3 to ios 6.0 with the same base code, by just tweaking some changes, or do we need to create a complete new target?
如果我想支持以前的版本,我们不能使用 ios 6.0 的自动布局,因为它会导致崩溃.
Like we cannot use auto layout of ios 6.0 if I want to support previous versions as it will lead to a crash.
推荐答案
是的,我们可以通过将部署目标设置为 iOS 4.3 来做到这一点.但是,你为什么需要支持iOS <5.0,因为大约 85-90% 的设备使用 iOS 5.0+.请参阅此
Yes, we can do this by setting up the Deployment Target to iOS 4.3. But then, why do you need to support iOS < 5.0 as around 85-90% of devices are on iOS 5.0+. See this
此外,当您设置对 iOS 4.3 甚至 iOS 5.1.1 的支持时,您将不得不处理多种事情.比如Orientation的方法,
Also, when you set up support for iOS 4.3 or even iOS 5.1.1, you would have to handle multiple things. For example, the method for Orientation,
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
iOS 6 不调用它.它被方法替换,
isn't called for iOS 6. It is replaced by the methods,
- (NSUInteger)supportedInterfaceOrientations
- (BOOL)shouldAutorotate
您需要设备上的所有 iOS 版本,然后测试应用程序的各个方面.
You would need all the iOS versions on devices and then test each and every aspect of your app.
这篇关于支持 iOS 4.3 到 iOS 6.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:支持 iOS 4.3 到 iOS 6.0
基础教程推荐
- navigator.geolocation.getCurrentPosition 在 Android 浏览器上 2022-01-01
- iOS4 创建后台定时器 2022-01-01
- 如何从 logcat 中删除旧数据? 2022-01-01
- iPhone - 获取给定地点/时区的当前日期和时间并将其与同一地点的另一个日期/时间进行比较的正确方法 2022-01-01
- NSString intValue 不能用于检索电话号码 2022-01-01
- 通过重定向链接在 Google Play 中打开应用 2022-01-01
- Cocos2d iPhone 非矩形精灵触摸检测 2022-01-01
- libGDX 从精灵或纹理中获取像素颜色 2022-01-01
- Android:getLastKnownLocation(LocationManager.NETWORK_PROVIDER 2022-01-01
- AdMob 广告未在模拟器中显示 2022-01-01
