[英]What if I use IOS graphical Segue instead of doing it in the view controller?
I have been coding in swift for 2 months now.我已经用 swift 编码了 2 个月了。 Is there any problem if i use the method of giving segue through storyboard instead of doing that in the program ?
如果我使用通过故事板提供 segue 的方法而不是在程序中这样做有什么问题吗?
Using segues versus constructing them manually has little difference semantically but I suppose it comes down to two choices:使用 segues 与手动构建它们在语义上几乎没有区别,但我认为它归结为两个选择:
My personal preference is to utilise storyboards in the creation of my app.我个人的偏好是在我的应用程序的创建中使用故事板。 This lends itself very well to utilising segues as they show visually the path in which the app will take.
这非常适合使用 segue,因为它们直观地显示了应用程序将采用的路径。
That been said, if I was using XIBs or code to create the UI then there would be little to no benefit in using segues.话虽如此,如果我使用 XIB 或代码来创建 UI,那么使用 segue 几乎没有好处。
Segues are potentially very powerful allowing you to create custom, reusable transitions. Segues 可能非常强大,允许您创建自定义的、可重用的过渡。 I would recommend reading the section on segues on the Apple developer site ( https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/CreatingCustomSegues/CreatingCustomSegues.html )
我建议您阅读 Apple 开发者网站 ( https://developer.apple.com/library/ios/featuredarticles/ViewControllerPGforiPhoneOS/CreatingCustomSegues/CreatingCustomSegues.html ) 上有关 segue 的部分
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.