i created new master-detail application xcode template
i found main interface ( in case birdmasterviewcontroller ) inherit uitableviewcontroller, , uitableviewcontroller conform uitableviewdatasource protocol
so can specify methods like
- (nsinteger)numberofsectionsintableview:(uitableview *)tableview { return 1; }
but did not find set delegate _datasource variable on birdmasterviewcontroller, like
xxxxxx._datasource = self; or setdatasource: self
to set _datasource object
// id <uitableviewdatasource> _datasource;
why delegation can run ?
add delegate in .h file , use delegate methods :
@interface birdmasterviewcontroller : uiviewcontroller<uitableviewdelegate,uitableviewdatasource>
Comments
Post a Comment