ios - Type 'ProfilesTableViewController' does not conform to protocol 'UITableViewDataSource' in Xcode 6 GM seed -


today migrated xcode 6 gm seed , following error:

type 'profilestableviewcontroller' not conform protocol 'uitableviewdatasource'.

i've overrided numberofrowsinsection, cellforrowatindexpath , numberofsectionsintableview.
in fact worked fine till today. noticed when remove uitableviewdatasource working fine, , no errors occured. .. necessary use 'uitableviewdatasource' anymore, or override functions it?

this code compiles fine:

class profiletableviewcontroller: uitableviewcontroller, uitableviewdelegate, uitableviewdatasource {   override func tableview(tableview: uitableview, numberofrowsinsection section: int) -> int {     return 1 }  override func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell {      let cell: uitableviewcell = tableview.dequeuereusablecellwithidentifier("foo", forindexpath: indexpath) uitableviewcell      return cell } } 

so, can subclass uitableviewcontroller , define uitableviewdatasource protocol implementation.

take notice using override keyword , not using auto-unwrapped arguments -- i.e., not this:

override func tableview(tableview: uitableview!, numberofrowsinsection section: int) -> int { 

which correct in previous xcode 6 betas.


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

visual studio 2010 - Connect to informix database windows form application -

android - Associate same looper with different threads -