MotionInMotion Episode 28 - Setup Wizards and Custom Container Controllers
Setup Wizards and Custom Container Controllers - MotionInMotion
ContainerViewを使ってウィザード形式の遷移
- SetupWizardController
- def init
- @current_controller ||= -1
- loadView
- @nav = UINavigationController.alloc.initWithRootViewController(next_controller)
- view.content.addSubview @nav.view
- next_controller
- controllers[@current_controller += 1].new
- viewDidAppear
- view.button.addTarget(self, action: 'next_step:',
- next_step(sender)
- if next_controller?
- navigationController(nav, willShowViewController: vc,
- @current_controller = controllers.index(vc.class)
- show_next_button if next_controller?
- def init