xcode IOS 5 SDK 中的情节提要但也针对 IOS 4 / 3?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7899990/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Storyboard in IOS 5 SDK but also target IOS 4 /3?
提问by kkurni
I love the idea of using storyboards, but unfortunately when I try to test this using IOS 4,
I change the deployment target to IOS 4 and I can't compile this anymore.
it said that Storyboards is not supported for IOS 4.3 or later
.
我喜欢使用故事板的想法,但不幸的是,当我尝试使用 IOS 4 进行测试时,我将部署目标更改为 IOS 4,并且无法再编译它。它说Storyboards is not supported for IOS 4.3 or later
。
So is it useful to use storyboards? How can I write iPhone apps using storyboards so that they can be compatible with IOS 4?
那么使用故事板有用吗?如何使用故事板编写 iPhone 应用程序,以便它们与 IOS 4 兼容?
回答by Stephen Darlington
I don't think that there's a reasonable way of doing it.
我不认为有一个合理的方法来做到这一点。
You couldinstantiate your Storyboards programatically (I think) but then you'd need something to fall back on on pre-iOS5 devices. And what would that be? Probably XIBs... which also continue to work on iOS5. You'd end up implementing everything twice. So, as I say, it may be possible but it's probably not practical.
您可以以编程方式(我认为)实例化您的 Storyboard,但随后您需要在 iOS5 之前的设备上依靠一些东西。那会是什么?可能是 XIBs ......它也继续在 iOS5 上工作。你最终会实施两次。所以,正如我所说,这可能是可能的,但可能不切实际。