Chapter 21: Storyboards and Custom Transitions

Prior to iOS 5, interface elements and views were created using Interface Builder (IB) and saved in nib files. Storyboards are a new way to create interfaces, and in addition to creating interface elements, you can now specify the navigation (called segues) between those interfaces. This was something you could not do previously without writing code. You can think of storyboards as a graph of all your view controllers connected by segues that dictate the transition between them.

The benefits of storyboards don’t stop there. They also make it easy for developers to create static table views without a data source. How many times have you wanted to create a table view that’s not bound to a real data source—for example, a table that shows a list of options instead of data. A common use for this is your app’s settings page. Storyboards also help co-developers and clients understand the complete workflow of the app.

Storyboards aren’t all romantic, and in my opinion, there are some significant drawbacks. Later in this chapter, we show you how to use storyboards without being hurt by those drawbacks.

We begin with how to start using storyboards and how to do things using storyboards that you do with nib files, such as communicating between controllers. In the “Static Tables” section later in this chapter, you find out how to create a static table view without a data source. Finally, you discover the most interesting aspect of storyboards—writing ...

Get iOS 6 Programming Pushing the Limits: Advanced Application Development for Apple iPhone, iPad and iPod Touch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.