Upload
others
View
13
Download
0
Embed Size (px)
Citation preview
These are confidential sessions—please refrain from streaming, blogging, or taking pictures
Session 309
Introduction to Storyboarding
Joshua PenningtonInterface Builder Engineer
1
2
3
Key Concepts Moving Data AdoptionAPI
HH
4
HHKey Concepts Moving Data API Adoption
5
6
• Navigation between scenes
• Push, Modal, Popover, and more
• Customizable
Segue
7
HHKey Concepts Moving Data API Adoption
8
Moving Data Between Controllers
• Passing data to new scenes
• Bringing results back
9
-[UIViewController prepareForSegue:sender:]
10
Moving Data Between ControllersPassing data down
• Invoked on source
• Override to pass data
prepareForSegue
11
Moving Data Between ControllersGetting results back
• Pass object back via delegate
Delegate
12
Prototype-based Tables
• Easy to create
• Efficient
• Dequeue copies at runtime
13
Static Table Views
• Design cells inline
• Sections, headers, and footers
• No data source!
14
15
Building DailyBuzzDemo
16
RecapWhat you just saw
• Building scenes and segues
• Passing Data
• Table View support
17
Tips, tricks, and advanced practicesStoryboarding in Depth
Rob MariniInterface Builder Engineer
18
HHKey Concepts Moving Data API Adoption
19
HHKey Concepts Moving Data API Adoption
20
Storyboards at RuntimeInteracting with Storyboards in code
21
Storyboards at RuntimeInteracting with Storyboards in code
22
UIStoryboardRuntime Representation of Your Editor
23
UIStoryboardRuntime Representation of Your Editor
24
UIStoryboardRuntime Representation of Your Editor
25
UIStoryboardLoading a Storyboard
• Loaded on demand+[UIStoryboard storyboardWithName:bundle:]
• Set up for you by UIApplication
<key>UIMainStoryboardFile</key>
26
UIStoryboardInstantiating View Controllers
• Starting Scene of a Storyboard-[UIStoryboard instantiateInitialViewController]
• Arbitrary View Controllers by identifier-[UIStoryboard instantiateViewControllerWithIdentifier:]
27
Storyboard InternalsUIStoryboard
28
UIStoryboardStoryboard Internals
• Familiar override points for custom initialization-[UIViewController viewDidLoad]
-[NSObject awakeFromNib]
-[UIViewController initWithCoder:]
29
UIStoryboardStoryboard Internals
• Familiar override points for custom initialization-[UIViewController viewDidLoad]
-[NSObject awakeFromNib]
-[UIViewController initWithCoder:]
30
UIViewControllerPassing Data and Context
• Setting up a downstream View Controller-[UIViewController prepareForSegue:sender:]
• Loading other View Controllers from a Storyboard-[UIViewController storyboard]
• Performing a Segue-[UIViewController performSegueWithIdentifier:sender:]
31
UIViewControllerPassing Data and Context
• Setting up a downstream View Controller-[UIViewController prepareForSegue:sender:]
• Loading other View Controllers from a Storyboard-[UIViewController storyboard]
• Performing a Segue-[UIViewController performSegueWithIdentifier:sender:]
32
UIStoryboardSeguePreparing for a Segue
• Context for setup-[UIStoryboardSegue destinationViewController]
-[UIStoryboardSegue identifier]
• UIStoryboardPopoverSegue-[UIStoryboardPopoverSegue popoverController]
33
UIStoryboardSeguePerforming a Segue
• Context for setup-[UIStoryboardSegue sourceViewController]
-[UIStoryboardSegue destinationViewController]
• Performing the visual transition-[UIStoryboardSegue perform]
34
HHKey Concepts Moving Data API Adoption
35
HHKey Concepts Moving Data API Adoption
36
RoadmapAdopting Storyboards in your applications
• Designed to be flexible
• Wholesale conversion■ One Storyboard for entire application
• Incremental adoption■ Storyboard as you go
37
Extending recipesRoad Map
• Existing application
• Load Storyboard for new UI
38
Extending recipesRoad Map
• Existing application
• Load Storyboard for new UI
39
Extending recipesRoad Map
• Existing application
• Load Storyboard for new UI
40
DemoExtending your applications
41
RecapWhat you just saw
• Can load a Storyboard for all or part of an application UI
• Creating and using Custom Segues
42
Key PointsWhat you just saw
• Introduction to Storyboards
• Building a Storyboard-based iPhone application
• Storyboards at Runtime
• Leveraging Storyboards in existing applications
43
Using Interface Builder in Xcode 4 Pacific HeightsTuesday 2:00PM
What’s New in Cocoa Touch Pacific HeightsThursday 4:30PM
Core Animation Essentials MissionThursday 11:30AM
Related Sessions
44
Cocoa Touch Lab Application Frameworks Lab DWednesday 2:00PM
Interface Builder Storyboarding Lab Developer Tools Lab BWednesday 2:00PM
Labs
45
More Information
Michael JurewitzDeveloper Tools [email protected]
DocumentationWhat’s New in iOS 5 http://developer.apple.com/iOS
Apple Developer Forumshttp://devforums.apple.com
46
47