• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
iOS UIStoryboard presentation
 

iOS UIStoryboard presentation

on

  • 1,422 views

 

Statistics

Views

Total Views
1,422
Views on SlideShare
1,343
Embed Views
79

Actions

Likes
1
Downloads
22
Comments
0

4 Embeds 79

http://blog.jtribe.com.au 67
http://0.0.0.0 9
http://armin.local 2
http://192.241.222.248 1

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    iOS UIStoryboard presentation iOS UIStoryboard presentation Presentation Transcript

    • EXPERIENCES WITH STORYBOARDS Gerald Kim - iOS Developer at jTribe @gerald_kim onTwitter Monday, 22 July 13
    • - UIStoryboard introduced in iOS 5.0.An Interface Builder tool that encapsulates a viewcontroller graph - Storyboards are an easy way to create a project quickly - Nice way to see an entire project and how it's connected Monday, 22 July 13 - UIStoryboard introduction. Still uses nibs when compiling - Can kind of use for wireframing. Rapidly make an app without code Improving: Unwind segues in iOS 6
    • BASICS OF STORYBOARDS • Storyboards are another tool to use. Code generated views and IB nibs can still fit in this toolbox as well • Storyboard scenes are concerned with UIViewControllers • Transitions between scenes dictated with UIStoryboardSegue Monday, 22 July 13 Another tool. Can use blank viewcontrollers as container to represent a code or IB generated view. UIViewControllers only.
    • STORYBOARD SEGUES • Built-in segues for the basic transitions: navigation push, modal, embed, pop-over (iPad only) • Custom segues allow you to customize the transition, from animations to viewcontroller management Monday, 22 July 13 Custom segues. Works with custom nav like popovers and hamburger slide menus like IIViewDeck. Personally found nothing custom segues couldn’t handle
    • STORYBOARD LIFECYCLE • UIStoryboard will call initWithCoder: for you • prepareForSegue: is called on source controller • Storyboard loads its assets • viewDidLoad: and the rest of the view methods are called Monday, 22 July 13 - No more initWithFrame. Can't depend on designated initializers - Gives you a chance to respond to segue and pass information. [SHOW DEMO] of creating a segue and custom segue code, of prepareForSegue
    • STORYBOARDS AND COLLECTIONVIEWS • Prototype cells can make layout easy • Static cells great for menus • Not as useful for reusable cells, especially with the new  registerNib:forCellReuseIdentifier: and registerClass:forCellReuseIdentifier: Monday, 22 July 13 - Prototype cells easy. Easier than before. Static tableviews [DEMO] - Not useful reuseable cells. Sharing cells between tableviews. Preferable to use nibs and code unless you want to copy/paste
    • STORYBOARDS AND CLUTTER • Limit to how many scenes you can fit in a storyboard (I noticed sluggishness at around 30-40) • Merge nightmare in a development team • Copy/paste viewcontroller layouts for reuseable viewcontrollers Monday, 22 July 13 Limit how many viewcontrollers Merge nightmare. Storyboards are still an ugly XML file Copy/paste. eg Login or Gallery view that you want to show in multiple places. NEXT
    • STORYBOARD LINKING • Can link Storyboards programmatically. + (UIStoryboard *)storyboardWithName:bundle: - (id)instantiateInitialViewController • RBStoryboardLink https://github.com/rob-brown/RBStoryboardLink Monday, 22 July 13 RBStoryboardLink. 3rd party library uses ViewController containment. Seperate storyboards into modules based on functionality. OK for some storyboards to contain 1 viewcontroller.
    • RBSTORYBOARDLINK • RBStoryboardLink is a great way to visually see links • Can continue to use segues during ‘links’ • Need to be careful of containment and new lifecycle Monday, 22 July 13 Continue to use segues during links, looks nicer, more connected Careful containment. Especially prepareForSegue, viewDidLoad in new controller [SHOW DEMO] Storyboard link, prepareForSegue to linked controller
    • WHEN NOTTO USE STORYBOARDS • Custom views that don’t initially belong in the viewcontroller (keyboard accessory views) • Reuseable views (UITableViewCells in multiple tableviews) • Highly dynamic views Monday, 22 July 13 Custom views. Keyboard accessory views, tableview headers Reuseable views. Between viewcontrollers: Cells, etc Highly animated views. Need to add views dynamically
    • SHOULD I CONVERTTO STORYBOARDS? • As always, it depends on your situation • Easy Autolayout in XCode 5 • Need to convert app flow to prepareForSegue: • UIAppearance proxies • Definitely recommend new projects use UIStoryboard Monday, 22 July 13 UIAppearance proxies: Apple swizzles init in views to implement appearance, overwriting any IB change. Will need to apply styles in viewDidLoad:
    • Questions? • WWDC 2012 Session 407 - Adopting Storyboards into your App • WWDC 2013 Session 405 - Interface Builder Core Concepts REFERENCES Monday, 22 July 13