165
© 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple. What’s New in Storyboards Mapping the flow of your app Kyle Sluder UIKit Frameworks Tony Ricciardi Development Technologies App Frameworks #WWDC15 Session 215

What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

© 2015 Apple Inc. All rights reserved. Redistribution or public display not permitted without written permission from Apple.

What’s New in StoryboardsMapping the flow of your app

Kyle Sluder UIKit FrameworksTony Ricciardi Development Technologies

App Frameworks #WWDC15

Session 215

Page 2: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

What’s New

Organizing Your StoryboardsCustomizing Standard SeguesUnwind Segues and Custom Containers

Page 3: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Organizing Your Storyboards

Page 4: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 5: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 6: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 7: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 8: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 9: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 10: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 11: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Main Storyboard

NavigationController

Collection ViewController

Photo ViewController

Page 12: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Main Storyboard

NavigationController

Collection ViewController

Photo ViewController

contains shows

Page 13: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Main Storyboard

NavigationController

Collection ViewController

Photo ViewController

root shows

Page 14: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Main Storyboard

NavigationController

Collection ViewController

Photo ViewController

root shows

Scenes

Interface Builder Core Concepts WWDC 2013

Page 15: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Main Storyboard

NavigationController

Collection ViewController

Photo ViewController

showsroot

Segues

Interface Builder Core Concepts WWDC 2013

Page 16: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Main Storyboard

NavigationController

Collection ViewController

Photo ViewController

showsroot

Relationship Segue

Interface Builder Core Concepts WWDC 2013

Page 17: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Main Storyboard

NavigationController

Collection ViewController

Photo ViewController

showsroot

Triggered Segue

Interface Builder Core Concepts WWDC 2013

Page 18: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Main Storyboard

NavigationController

Collection ViewController

Photo ViewController

root shows

Page 19: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 20: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Main.storyboard

photoController

showPic

collectionVC

Page 21: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Main.storyboard

photoController

showPic

collectionVC

Page 22: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Main.storyboard

photoController

showPic

collectionVC

Page 23: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Main.storyboard

photoController

showPic

collectionVC

Page 24: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Main.storyboard

photoController

showPic

collectionVC

Page 25: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Main.storyboard

photoController

showPic

collectionVC

Page 26: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Main.storyboard

photoController

showPic

collectionVC

Page 27: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Main.storyboard

photoController

showPic

collectionVC

Page 28: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Main.storyboard

photoController

showPic

collectionVC

Page 29: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Main.storyboard

photoController

showPic

collectionVC

Page 30: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Main.storyboard

photoController

showPic

collectionVC

Page 31: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 32: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 33: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 34: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 35: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 36: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

UIStoryboard(name: "Secondary")

Page 37: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

UIStoryboard(name: "Secondary") .instantiateViewControllerWithIdentifier("tabController")

Page 38: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 39: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 40: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Storyboard References

Stands in for another sceneCan be destination of Relationship or Triggered SegueReference can be in same storyboard or another storyboard

Secondary Storyboard

Main Storyboard

Page 41: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

DemoUsing storyboard references

Page 42: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Customizing Standard Segues

Page 43: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Table ViewController

Page 44: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Table ViewController

Page 45: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Table ViewController

presentmodally

Page 46: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Table ViewController

NavigationController

presentmodally

Page 47: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Table ViewController

Page 48: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Table ViewController

Page 49: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Table ViewController

presentmodally

Page 50: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Table ViewController

presentmodally

NavigationController

Page 51: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Table ViewController

Page 52: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Table ViewController

NavigationController

Page 53: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Table ViewController

NavigationController

Page 54: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Table ViewController

NavigationController

Page 55: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Table ViewController

NavigationController

Page 56: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Table ViewController

NavigationController

Page 57: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Table ViewController

NavigationController

Page 58: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Table ViewController

NavigationController

Page 59: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Table ViewController

NavigationController

{}

Page 60: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

class MySegue: UIStoryboardSegue {

override func perform() -> () {

setUpAnimation()

sourceViewController .presentViewController(...) } }

Page 61: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Segue Subclassing

Can specify a UIStoryboardSegue subclass for any triggered or unwind segueOverride perform()Call super.perform() for standard behaviorPresent Modally and Popover Presentation segues retained throughout presentation

Page 62: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Segue SubclassingCustomizing presentation animations

Page 63: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Segue Subclassing

User triggers segue

Customizing presentation animations

Segue DestinationView Controller

Page 64: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Segue Subclassing

User triggers segue• Assign transitioning delegate

Customizing presentation animations

TransitioningDelegate

Segue DestinationView Controller

Page 65: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Segue Subclassing

User triggers segue• Assign transitioning delegate• Call super.perform() to

start modal presentation

Customizing presentation animations

TransitioningDelegate

Segue DestinationView Controller

Page 66: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Segue Subclassing

User triggers segue• Assign transitioning delegate• Call super.perform() to

start modal presentation• Vend animation controller

for presentation

AnimationController

Customizing presentation animations

TransitioningDelegate

Segue DestinationView Controller

Page 67: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Segue Subclassing

User triggers segue• Assign transitioning delegate• Call super.perform() to

start modal presentation• Vend animation controller

for presentation• Animate appearance of

view controller

AnimationController

Customizing presentation animations

TransitioningDelegate

Segue DestinationView Controller

DestinationView Controller

Custom Transitions Using View Controllers WWDC 2013

Page 68: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Segue SubclassingCustomizing presentation animations

TransitioningDelegate

Segue DestinationView Controller

Custom Transitions Using View Controllers WWDC 2013

Page 69: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Segue Subclassing

User dismisses presentation

Customizing presentation animations

TransitioningDelegate

Segue DestinationView Controller

Custom Transitions Using View Controllers WWDC 2013

Page 70: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

AnimationController

Segue Subclassing

User dismisses presentation• Vend animation controller

for dismissal

Customizing presentation animations

TransitioningDelegate

Segue DestinationView Controller

Custom Transitions Using View Controllers WWDC 2013

Page 71: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Segue Subclassing

User dismisses presentation• Vend animation controller

for dismissal• Animate dismissal of

view controller

Customizing presentation animations

Segue

Custom Transitions Using View Controllers WWDC 2013

Page 72: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Getting Started with Multitasking on iPad in iOS 9 Presidio Tuesday 4:30PM

Page 73: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Segue SubclassingCustomizing adaptive presentations

Segue DestinationView Controller

PresentationController

Page 74: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Segue SubclassingCustomizing adaptive presentations

User triggers segue Segue DestinationView Controller

PresentationController

Page 75: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Segue SubclassingCustomizing adaptive presentations

User triggers segue• Assign delegate to presentation controller

Segue

AdaptiveDelegate

DestinationView Controller

PresentationController

Page 76: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Segue SubclassingCustomizing adaptive presentations

User triggers segue• Assign delegate to presentation controller• Call super.perform() to perform

modal presentation

Segue

AdaptiveDelegate

DestinationView Controller

PresentationController

DestinationView Controller

Page 77: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Segue SubclassingCustomizing adaptive presentations

User triggers segue• Assign delegate to presentation controller• Call super.perform() to perform

modal presentation

Size class changes

Segue

AdaptiveDelegate

DestinationView Controller

PresentationController

DestinationView Controller

Page 78: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Segue SubclassingCustomizing adaptive presentations

User triggers segue• Assign delegate to presentation controller• Call super.perform() to perform

modal presentation

Size class changes• Presentation controller informs delegate

Segue

AdaptiveDelegate

DestinationView Controller

PresentationController

DestinationView Controller

Page 79: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Segue SubclassingCustomizing adaptive presentations

User triggers segue• Assign delegate to presentation controller• Call super.perform() to perform

modal presentation

Size class changes• Presentation controller informs delegate• Delegate vends new view controller

Segue

AdaptiveDelegate

DestinationView Controller

PresentationController

DestinationView Controller

AdaptiveView Controller

View Controller Advancements in iOS 8 WWDC 2013

Page 80: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

DemoCustomizing standard segues

Page 81: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues and Custom Containers

Page 82: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 83: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 84: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 85: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 86: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 87: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard
Page 88: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

“Take me home”

Page 89: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

“Take me home”

Page 90: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

“Take me home”1. Identify destination

Page 91: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

“Take me home”

2. Find destination

1. Identify destination

Page 92: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

“Take me home”

2. Find destination

3. Follow route

1. Identify destination

Page 93: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Page 94: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Unwind Segues

Page 95: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

Page 96: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

Page 97: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 98: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 99: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

“Go back to the journal”

Page 100: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 101: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 102: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

performSelectorWithIdentifier("goBackToJournal", sender:…)

Page 103: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 104: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind SeguesIdentify the destination

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 105: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind SeguesIdentify the destination

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 106: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind SeguesIdentify the destination

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 107: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind SeguesIdentify the destination

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

@IBAction func iAmTheJournal(_: UIStoryboardSegue) -> () { // empty }

Page 108: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind SeguesIdentify the destination

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 109: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind SeguesFind the destination

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 110: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind SeguesFind the destination

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 111: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 112: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

viewControllerForUnwindSegueAction("iAmTheJournal:", withSender:…)

Page 113: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

override allowedChildViewControllersForUnwindingFromSource(_:)

Page 114: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

childViewControllerContainingSegueSource(_:)

Page 115: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

childViewControllerContainingSegueSource(_:)

Page 116: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

childViewControllerContainingSegueSource(_:)

Page 117: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 118: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

override allowedChildViewControllersForUnwindingFromSource(_:)

Page 119: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 120: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

canPerformUnwindSegueAction("iAmTheJournal:", fromViewController:…)

Page 121: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

canPerformUnwindSegueAction("iAmTheJournal:", fromViewController:…)

Page 122: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 123: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

override allowedChildViewControllersForUnwindingFromSource(_:)

Page 124: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 125: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

childViewControllerContainingSegueSource(_:)

Page 126: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

childViewControllerContainingSegueSource(_:)

Page 127: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 128: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 129: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

override allowedChildViewControllersForUnwindingFromSource(_:)

Page 130: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

override allowedChildViewControllersForUnwindingFromSource(_:)

Page 131: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 132: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

canPerformUnwindSegueAction("iAmTheJournal:", fromViewController:…)

Page 133: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

canPerformUnwindSegueAction("iAmTheJournal:", fromViewController:…)

Page 134: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 135: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 136: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 137: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwind Segues

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

override segueForUnwindingToViewController(_:fromViewController:identifier:)

Page 138: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Incremental Unwinding

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Page 139: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Incremental Unwinding

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Segue

Page 140: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Incremental Unwinding

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Segue

perform()

Page 141: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Incremental Unwinding

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Segue

Page 142: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Incremental UnwindingFollow the route

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Segue

Page 143: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Incremental UnwindingFollow the route

Custom TabView Controller

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Segue

Page 144: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Incremental Unwinding

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

SegueCustom Tab

View Controller

Page 145: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Incremental Unwinding

Journal Navigation Controller

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

override unwindForSegue(segue, towardsViewController:custom tab)

SegueCustom Tab

View Controller

Page 146: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Incremental Unwinding

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

Segue

Journal Navigation Controller

Custom TabView Controller

Page 147: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Incremental Unwinding

Journal TableView Controller

Photo Navigation Controller

Photos CollectionView Controller

PhotoView Controller

override unwindForSegue(segue, towardsViewController:journal nav)

Segue

Journal Navigation Controller

Custom TabView Controller

Page 148: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Incremental Unwindingoverride unwindForSegue(segue, towardsViewController:journal nav)

Segue

Journal TableView Controller

Photo Navigation Controller

PhotoView Controller

Photos CollectionView Controller

Journal Navigation Controller

Custom TabView Controller

Page 149: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Incremental Unwindingoverride unwindForSegue(segue, towardsViewController:journal nav)

SegueCustom Tab

View Controller

Journal TableView Controller

Journal Navigation Controller

Page 150: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Incremental Unwinding

Custom TabView Controller

Journal TableView Controller

Journal Navigation Controller

Segue

Page 151: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Incremental Unwinding

Custom TabView Controller

override unwindTowardsViewController(CustomTab, fromViewController:Photo)

Journal TableView Controller

Journal Navigation Controller

Segue

Page 152: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Incremental Unwinding

Custom TabView Controller

Journal TableView Controller

Journal Navigation Controller

Page 153: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

DemoUnwind segues and custom containers

Page 154: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwinding APIsFinding the destination

viewControllerForUnwindSegueAction(_:fromViewController:sender:)

override allowedChildViewControllersForUnwindingFromSource(_:)

childViewControllerContainingSegueSource(_:)

override canPerformUnwindSegueAction(_:fromViewController:sender:)

Page 155: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Unwinding APIsFollowing the route

segueForUnwindingToViewController(_:fromViewController:identifier:)

override unwindForSegue(_:towardsViewController:)

Page 156: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Summary

Page 157: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Summary

Organize your storyboards using Storyboard References

Page 158: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Summary

Organize your storyboards using Storyboard ReferencesCustomize triggered and unwind segues by subclassing

Page 159: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Summary

Organize your storyboards using Storyboard ReferencesCustomize triggered and unwind segues by subclassing• Present Modally and Popover Presentation segues have extended lifetimes

Page 160: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Summary

Organize your storyboards using Storyboard ReferencesCustomize triggered and unwind segues by subclassing• Present Modally and Popover Presentation segues have extended lifetimes

Unwind segues move backward through application flow

Page 161: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Summary

Organize your storyboards using Storyboard ReferencesCustomize triggered and unwind segues by subclassing• Present Modally and Popover Presentation segues have extended lifetimes

Unwind segues move backward through application flow• Support unwind segues in custom containers

Page 162: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Summary

Organize your storyboards using Storyboard ReferencesCustomize triggered and unwind segues by subclassing• Present Modally and Popover Presentation segues have extended lifetimes

Unwind segues move backward through application flow• Support unwind segues in custom containers• Remove implementations of deprecated API to get new behavior

Page 163: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

More Information

DocumentationStoryboard Help

Sample CodeSegueCatalog

http://developer.apple.com/library

Technical SupportApple Developer ForumsDeveloper Technical Support

General InquiriesCurt Rothert, App Frameworks [email protected]

Page 164: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard

Related Session and Lab

Implementing UI Designs in Interface Builder Pacific Heights Wednesday 1:30PM

Interface Builder and Auto Layout Lab Developer Tools Lab B Thursday 1:30PM

Page 165: What’s New in Storyboards - Apple Developer · Storyboard References Stands in for another scene Can be destination of Relationship or Triggered Segue Reference can be in same storyboard