I created a TTModelViewController. in the createModel Method i created a TTURLRequestModel. after Loading content in the TTURLRequestModel i want to call a method in my TTModelViewController.
TTModelViewController
- (void) createModel {
requestModel = [[singlePostModel alloc] initWithId:@"54"];
}
- (void)didLoadModel:(BOOL)firstTime {
NSLog(@"loaded");
}
TTURLRequestModel (singlePostModel)
- (void)requestDidFinishLoad:(TTURLRequest*)request {
//doing something
[super requestDidFinishLoad:request];
}
first i thought "didLoadModel" gets called after requestDidFinishLoad was called, but its before.
So, how can i call a method in my TTModelViewController after request is finished loading? is there a method that already does that and i only have to overwrite this? or something else?
thanks
// if knowbody knows how to do this with three20, anybody can tell me how to do this in general?
edit
the solution of the first post works fine now, but i still got a warning that the function i call to my object doesnt exist:
@interface TTModelViewController {
}
- (void)modelFinishedLoading;
@end
and now i call that method in my models class
[controller modelFinishedLoading];
at this point xcode throws a warning "no -modelFinishedLoading method found".
why? i implemented it in the interface and also in the implementation part of TTModelViewController.
does that have to do with this @class at my singlePostModel?
@class singlePostViewController;
@interface singlePostModel : TTURLRequestModel