支持 iOS 4.3 到 iOS 6.0

Supporting iOS 4.3 to iOS 6.0(支持 iOS 4.3 到 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的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Why local notification is not firing for UNCalendarNotificationTrigger(为什么没有为UNCalendarNotificationTrigger触发本地通知)
iOS VoiceOver functionality changes with Bundle Identifier(IOS画外音功能随捆绑包标识符而变化)
tabbar middle tab out of tabbar corner(选项卡栏中间的选项卡角外)
Pushing UIViewController above UITabBar(将UIView控制器推送到UITabBar上方)
How can I sync two flatList scroll position in react native(如何在本机Reaction中同步两个平面列表滚动位置)
Get an event when UIBarButtonItem menu is displayed(显示UIBarButtonItem菜单时获取事件)