How to call a method of a specific class from another class (created in this specific class) ?
- by choise
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?