MotionInMotion Episode 2 - Delegates & Data Sources
Delegates & Data Sources - MotionInMotion
rableViewでdelegate使った実装
- MVC
- D - delegate
- DS - dataSource
- controller <-> model - KVO
- PostsController#init
- @postsModel = UIApplication.sharedApplication.delegate.postsModel
- def viewDidLoad
- self.tableView.delegate = self
- self.tableView.dataSource = self
- def tableView(tableView, numberOfRowsInSection:section)
- def tableView(tableView, cellForRowAtIndexPath:indexPath)
- def tableView(tableView, didSelectRowAtIndexPath:indexPath)