Graphics Programs Reference
In-Depth Information
More on Storyboards
In this exercise, you created a storyboard, set up a few view controllers, laid out their inter-
faces, and created some segues between them. This is the basic idea behind storyboards,
and while there are a few more flavors of segues and types of view controllers you can set
up, you get the idea. A storyboard replaces lines of code.
For example, the push segues in this application replace this code:
- (void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)ip
{
UIViewController *vc = [[UIViewController alloc] init];
[[self navigationController] pushViewController:vc];
}
While this seems nice, storyboarding, in our opinion, is not very useful. Let's go through
the pros and cons. First, the pros:
• Storyboards can be used to easily show off the flow of an application to a client or
a colleague.
• Storyboards remove some simple code from your source files.
• Tables with static content are easy to create.
• Storyboards sure do look pretty.
The cons, unfortunately, outweigh the pros:
• Storyboards are difficult to work with in a team. Typically, a team of iOS program-
mers breaks up the work by having each member focus on a particular view con-
troller. With a storyboard, everyone has to do their work in the same storyboard
file. This can quickly lead to clutter.
Search WWH ::




Custom Search