ios - Twitter Kit/Fabric “Show Timeline” Objective-C example build fail -
following along fabric/twitter kit documentation display user timeline. code docs doesn't build.
this code in timeline view controller in view did load.
[[twitter sharedinstance] loginguestwithcompletion:^(twtrguestsession *guestsession, nserror *error) { if (guestsession) { twtrapiclient *apiclient = [[twitter sharedinstance] apiclient]; twtrusertimelinedatasource *usertimelinedatasource = [[twtrusertimelinedatasource alloc] initwithscreenname:@"fabric" apiclient:apiclient]; self.datasource = usertimelinedatasource; // <- build fail here } else { nslog(@"error: %@", [error localizeddescription]); }
}];
xcode complains: "property 'datasource' not found on object of type 'timelineviewcontroller ". not sure why it's acting since verbatim docs example.
any appreciated!
talked friend, helped me figure out
originally had this
@interface timelineviewcontroller : uiviewcontroller
needed change this
@interface timelineviewcontroller : twtrtimelineviewcontroller
in .h of timelineviewcontroller file, subclassing uiviewcontroller instead of "twtrtimelineviewcontroller" twitter kit. original class doesn't have property of self.datasource. sub class of twtrtimelineviewcontroller on other hand does.
Comments
Post a Comment