Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Thirteen Ways of Looking at a View Controller

Thirteen Ways of Looking at a View Controller

View controllers: we know them, love them, despise them, and overload them.

06609d73ad2165c4aafcf65a1ddb9563?s=128

Greg Heo

June 06, 2017
Tweet

Transcript

  1. @gregheo AltConf 2017 I was of three minds, Like a

    tree In which there are three blackbirds. Thirteen Ways of Looking at a Blackbird
 Wallace Stevens
  2. @gregheo AltConf 2017 Thirteen Ways of Looking at a View

    Controller approximately
  3. @gregheo AltConf 2017 Hold the Model Controller Model View

  4. @gregheo AltConf 2017 Coordinate Between Views Button Label tap
 action

    set
 text View Controller ???
  5. @gregheo AltConf 2017 View Appearance Callbacks • view did load

    • view will / did appear • view will / did disappear
  6. @gregheo AltConf 2017 Handle View Layout • loadView • view

    setup in viewDidLoad • view will / did layout subviews • layout guides
  7. @gregheo AltConf 2017 “We shape our buildings, 
 and afterwards

    our
 buildings shape us.”
  8. @gregheo AltConf 2017 Miscellaneous • “is editing” state • state

    restoration • search display controller • title
  9. @gregheo AltConf 2017 Manage Style • presentation style • transitions

    • thirteen ways to handle rotation
  10. @gregheo AltConf 2017 Navigation • Navigation controllers, tab bar controllers,


    split view controllers • View controller containment • Storyboard segues
  11. @gregheo AltConf 2017 Among twenty snowy mountains, The only moving

    thing Was the eye of the blackbird. swift
  12. @gregheo AltConf 2017 " #

  13. @gregheo AltConf 2017 so controlling such view much single
 responsibility

    wow very SOLID
  14. @gregheo AltConf 2017 Model View Presentation Logic Navigation Business
 Logic

    Manage Views Massive View Controller View Controller
  15. @gregheo AltConf 2017 View Controller Model View Presentation Logic Navigation?

    Business
 Logic Manage Views MVVM View Model
  16. @gregheo AltConf 2017 Routing Entity View Presentation Logic Navigation Business


    Logic Models VIPER Presenter Interactor
  17. @gregheo AltConf 2017 Router View Presentation Logic Navigation Business
 Logic

    Model Riblets Presenter Interactor
  18. @gregheo AltConf 2017 Streams View Model Reactive Observer Business
 Logic

    View Model Business
 Logic
  19. @gregheo AltConf 2017 When the blackbird flew out of sight,

    It marked the edge Of one of many circles.
  20. @gregheo AltConf 2017

  21. @gregheo AltConf 2017

  22. @gregheo AltConf 2017 Thirteen Ways of Looking at a View

    Controller