Slide 1

Slide 1 text

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.

Slide 2

Slide 2 text

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.

Slide 3

Slide 3 text

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.

Slide 4

Slide 4 text

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.

Slide 5

Slide 5 text

WAIT Wednesday, 13 June, 12 But Wait. We’re getting a little ahead of ourselves.

Slide 6

Slide 6 text

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.

Slide 7

Slide 7 text

Wednesday, 13 June, 12 So this is an example of the oldskool way of how we pushed views onto the stack.

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

-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!

Slide 10

Slide 10 text

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?

Slide 11

Slide 11 text

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.

Slide 12

Slide 12 text

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.

Slide 13

Slide 13 text

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.

Slide 14

Slide 14 text

Wednesday, 13 June, 12 To XCode!!

Slide 15

Slide 15 text

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.

Slide 16

Slide 16 text

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.

Slide 17

Slide 17 text

- 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.

Slide 18

Slide 18 text

Wednesday, 13 June, 12