支持iOS 4.3到iOS 6.0 [英] Supporting iOS 4.3 to iOS 6.0

查看:74
本文介绍了支持iOS 4.3到iOS 6.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经拥有支持ios 4.3到ios 5的基本代码。现在我还想支持ios 6.0。
目前的基本代码有模态视图,硬编码 CGRect的,每个视图的轮换不同。所以我想知道我们是否可以使用相同的基本代码支持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的支持,你必须处理多个事情。例如,方向的方法,

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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆