26
Storytelling with Storyboard Part 2

Storytelling with storyboard part2

  • Upload
    nolili

  • View
    885

  • Download
    1

Embed Size (px)

Citation preview

Page 1: Storytelling with storyboard part2

Storytelling with

Storyboard

Part 2

Page 2: Storytelling with storyboard part2

前回のおさらい

Page 3: Storytelling with storyboard part2
Page 4: Storytelling with storyboard part2

UIViewController prepareForSegue::

Page 5: Storytelling with storyboard part2

FirstViewController

SecondViewController

delegate

prepareForSegue

delegateMethod

destinationViewController

Page 6: Storytelling with storyboard part2

FirstViewController

SecondViewController

Page 7: Storytelling with storyboard part2

FirstViewController

SecondViewController

initWithCoder:

prepareForSegue:sender

viewDidLoad

viewWillDisappear:

viewWillAppear:

viewDidDisappear:

viewDidAppear:

Page 8: Storytelling with storyboard part2

Storyboarding +

Table View

Page 9: Storytelling with storyboard part2

Dynamic Prototypes

Page 10: Storytelling with storyboard part2

Dynamic Prototypes

UITableViewDataSource従来のTable View

Page 11: Storytelling with storyboard part2
Page 12: Storytelling with storyboard part2

Static Cells

Page 13: Storytelling with storyboard part2

Static Cells

Page 14: Storytelling with storyboard part2

Storyboarding +

Popover

Page 15: Storytelling with storyboard part2

Storyboarding+

Gesture

Page 16: Storytelling with storyboard part2
Page 17: Storytelling with storyboard part2

Storyboarding+

Code

Page 18: Storytelling with storyboard part2

UIStoryboardUIStoryboardSegueUIViewController

Page 19: Storytelling with storyboard part2

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Storyboard" bundle:nil];

Storyboardのインスタンスを取得する

Page 20: Storytelling with storyboard part2

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Storyboard" bundle:nil];UIViewController *controller = [storyboard instantiateViewControllerWithIdentifier:@"Second"];

Identifierを指定してViewControllerを取得する

Page 21: Storytelling with storyboard part2

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Storyboard" bundle:nil];UIViewController *initialViewController = [storyboard instantiateInitialViewController];

Storyboardの最初のシーンを取得

Page 22: Storytelling with storyboard part2

UIViewController *viewController = ... [viewController performSegueWithIdentifier:@"next" sender:self];

SegueのIdentifierを指定して遷移

Page 23: Storytelling with storyboard part2

自分で定義したSegueを使う

Page 24: Storytelling with storyboard part2

UIStoryboardSegueのサブクラスを作る

Page 25: Storytelling with storyboard part2

perform メソッドをオーバーライドする

Page 26: Storytelling with storyboard part2

Q&A