Upgrade to Pro — share decks privately, control downloads, hide ads and more …

UIStoryboard

Rob Brown
January 12, 2012

 UIStoryboard

UIStoryboard is a valuable tool to iOS development. The intent of this presentation is to help you understand the basics of storyboarding. For more details on best practices, check out my blog here: http://robsprogramknowledge.blogspot.com/2012/01/uistoryboard-best-practices.html.

Rob Brown

January 12, 2012
Tweet

More Decks by Rob Brown

Other Decks in Programming

Transcript

  1. What is a storyboard? A collection of views and the

    transitions between them. May contain all the views in an app or a subset. A necessity for rapid UI development. Great for prototyping. A picture is worth a thousand lines of code.
  2. How do UIStoryboards compare to XIBs? UIStoryboard: Interface Builder IBOutlets/IBActions

    Segues Static cells Prototype cells XIB: Interface Builder IBOutlets/IBActions
  3. What is a segue? Not the cool, two-wheeled mobility device

    invented by Dean Kamen. A transition from one view controller to another. Alternatively can present a popover.
  4. -prepareForSegue:sender: Called on the source view controller before the transition

    happens. The segue keeps track of the destination view controller. Use this method to pass data on to the destination view controller.
  5. Types of segues Push Modal All standard modal transitions are

    supported. Popover (iPad only) Custom Any transition you want.
  6. Static cells Used for table views that always look the

    same. No need for a UITableViewDataSource nor a UITableViewDelegate. May eliminate the need for a UITableViewController subclass.
  7. Prototype cells Custom UITableViewCells associated with a UITableView. Makes it

    easy to create and use custom cells. Usually requires a custom cell class. May eliminate the need for a UITableViewDelegate.
  8. Other advantages Keeps similar views together. Gives a bird’s eye

    view of the app. Makes the view hierarchy easier to analyze. Saves a lot of coding.