How to call a method of a specific class from another class (created in this specific class) ?
Posted
by choise
on Stack Overflow
See other posts from Stack Overflow
or by choise
Published on 2010-03-12T17:51:37Z
Indexed on
2010/03/15
11:09 UTC
Read the original article
Hit count: 274
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?
© Stack Overflow or respective owner