在iOS编程中使用Storyboard而不是xib文件有什么好处? [英] What are the benefits of using Storyboards instead of xib files in iOS programming?

查看:84
本文介绍了在iOS编程中使用Storyboard而不是xib文件有什么好处?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Storyboard和xib文件之间的主要差异是什么。

What are the main differences between using Storyboards and xib files.

具体来说,
优势是什么使用故事板的缺点

不幸的是,尽管做了大量的研究,我在故事板上找到的所有内容都是简单的教程,向您展示如何设置故事板,而不是具体信息来解释它们是什么。

Unfortunately, despite doing quite a bit of research, all I've been able to find on Storyboards are simple tutorials that show you how to set up a Storyboard, instead of concrete information explaining what they are.

推荐答案

故事板是:


  • 所有场景的容器(视图控制器,导航控制器,TabBar控制器等)

  • 经理这些场景之间的连接和转换(这些称为Segues)

  • 管理不同控制器如何相互通信的好方法

  • 故事板给你全面了解您的应用程序流程,您永远无法从单独的nib文件中获取。

  • 所有减速器你有几个控制器,每个控制器都有自己的nib文件时会发生混乱。

  • A container for all your Scenes (View Controllers, Nav Controllers, TabBar Controllers, etc)
  • A manager of connections and transitions between these scenes (these are called Segues)
  • A nice way to manage how different controllers talk to each other
  • Storyboards give you a complete look at the flow of your application that you can never get from individual nib files floating around.
  • A reducer of all the "clutter" that happens when you have several controllers each with it's own nib file.

我现在已经使用了Storyboard一段时间了唯一的缺点是你不能以iOS 4或更低版本为目标。故事板仅适用于运行iOS 5或更高版本的设备。除此之外,其好处很多,而且缺点是IMO不存在。

I have been using Storyboards for awhile now and the ONLY downside is that you can't target iOS 4 or below. Storyboards only work on devices running iOS 5 or better. Other than that, the benefits are many and the downsides are non-existent IMO.

我见过的最好的教程是 Ray Wenderlich's

The best tutorial I have seen is Ray Wenderlich's

此外,如果您是Apple Developer计划的成员,请查看去年的WWDC会议故事板(iTunesU),它真棒。

Also, if you are a member of the Apple Developer program, check out last years WWDC session on Storyboards (iTunesU), it is awesome.

另一个很棒的(也在iTunesU上)是最新的斯坦福iOS应用程序编程课程。

Another great one (also on iTunesU) is the latest Stanford iOS Application Programming course.

这篇关于在iOS编程中使用Storyboard而不是xib文件有什么好处?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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