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


- Android - 拆分 Drawable 2022-01-01
- Android viewpager检测滑动超出范围 2022-01-01
- Android - 我如何找出用户有多少未读电子邮件? 2022-01-01
- 如何检查发送到 Android 应用程序的 Firebase 消息的传递状态? 2022-01-01
- 使用自定义动画时在 iOS9 上忽略 edgesForExtendedLayout 2022-01-01
- 想使用ViewPager,无法识别android.support.*? 2022-01-01
- MalformedJsonException:在第1行第1列路径中使用JsonReader.setLenient(True)接受格式错误的JSON 2022-01-01
- android 4中的android RadioButton问题 2022-01-01
- 在测试浓缩咖啡时,Android设备不会在屏幕上启动活动 2022-01-01
- 用 Swift 实现 UITextFieldDelegate 2022-01-01