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

iOS Storyboards

csaunders
June 13, 2012
190

iOS Storyboards

csaunders

June 13, 2012
Tweet

Transcript

  1. Storyboards Wednesday, 13 June, 12 Hey, most of you know

    me. For those who don’t I’m Chris. Rails developer by day, everything developer by night. Today I’ll be talking about this new feature called Storyboards.
  2. Wednesday, 13 June, 12 Often when we hear storyboards, we

    think of them being used in Movies, TV Shows, Video games and so on. They’re used to easily establish how a scene comes together.
  3. Wednesday, 13 June, 12 We’ve also commonly seen them used

    for software development to show how a user would typically interact with various aspects of a program.
  4. iOS 5.0 Wednesday, 13 June, 12 Storyboards are a pretty

    new feature that was recently introduced for use with iOS 5. Like something you would use to describe how interaction works on paper, you can do the same thing in XCode to describe the flow of an application.
  5. Wednesday, 13 June, 12 Let’s talk about how things were

    done back in the day. Before storyboards, we had a drastically different way of handling how we changed screens on iOS. This basically included loading the nib from disk and instantiating the view controller.
  6. Wednesday, 13 June, 12 So this is an example of

    the oldskool way of how we pushed views onto the stack.
  7. 4.3 Wednesday, 13 June, 12 Keep in mind, if you

    are a good developer (and we all are, right?) you are still targeting older platforms and this is how you still do it. Why? Well because storyboards are only supported on iOS 5 devices. Sadly
  8. -9000 Wednesday, 13 June, 12 But this sucks. You end

    up with a lot of boilerplate to just get your controller set up. This isn’t even telling the controller what data it’s bound to!
  9. Wednesday, 13 June, 12 Behold! The Storyboard! Although it’s new,

    it still looks quite similar to interface builder, except we have these little arrow-y line things going from one controller to another. We’ll talk a bit more about these later. But what are some of the reasons why storyboards are awesome?
  10. Mock Interaction Wednesday, 13 June, 12 Well for one, they

    allow you pretty much set up your entire applications interaction. It might be using default UI elements or perhaps mock data but it could give you a basic idea of how your applications flow will be.
  11. Rapid Development Wednesday, 13 June, 12 Also, since you’re spending

    less time worrying about how to get from one controller to another it allows you to rapidly develop the application. You’ll get builds out quicker which gives your clients quicker results, which in return gives you quicker feedback to turn out newer builds. Repeat.
  12. Segue Wednesday, 13 June, 12 Most of this is done

    via a new concept call the Segue. Those are the little line things that go from one controller to the next. We are able to do a few things with them (push, modal, and custom anims), give it a name to make it easier to identify in the code, and so on.
  13. Reality Wednesday, 13 June, 12 So these are pretty awesome.

    But let’s bring things back to reality for a second. Although the storyboard feature is pretty awesome it does come with it’s own set of fallbacks.
  14. Wednesday, 13 June, 12 For anyone who’s worked on nibs

    in a team, you’ve probably already experienced merging pains if you and a colleague both accidentally modified the same file. Take that pain, and multiply it by a thousand. Since all of your views are essentially contained within the same massive nib, having two people work on two separate views in the storyboard is almost impossible.
  15. - Dream + Nightmare Wednesday, 13 June, 12 So this

    takes that wonderful dream and turns them into a horrible horrible diffing nightmare. Hopefully you get the merge working properly, and if you can’t hopefully you’re using git or something so you can try again and perhaps get it right.