quattro_4 scribble

scribble 落書き (調べた事をただ落書きする)

MotionInMotion Episode 2 - Delegates & Data Sources

Delegates & Data Sources - MotionInMotion

rableViewでdelegate使った実装

f:id:quattro_4:20140110224049p:plain

  • 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)