ios - problem with a custom subclass of uitableview -


i writing custom subclass of uitableview. need object own data source , delegate, , subclass have own data source , delegate. done can intercept calls datasource , delegate , potentially augment them before sending them off actual datasources.

my class defined so.

customtableview : uitableview<uitableviewdelegate, uitableviewdatasource> {    ...    id customdatasource;    id customdelegate; } 

the problem comes when try set data source , delegate.

i override uitableview's properties:

- (void)setdatasource(id<uitableviewdatasource>)ds {    [super setdatasource:self]    customdatasource = ds; } 

basically, tell parent class(uitableview) set data source self. forward callbacks customdatasource, after have modified them.

[super setdatasource:self] doesnt crash, datasource never gets set. have ideas? thanks

i ended not needing use method proposed in question, did working. problem had accidentaly synthesized properties needed overriding, namely datasource , delegate.

for people need in future, override setdelegate , setdatasource in custom subclass.


Comments

Popular posts from this blog

Add email recipient to all new Trac tickets -

400 Bad Request on Apache/PHP AddHandler wrapper -

php - Change action and image src url's with jQuery -