JewelsSharedController.m:
-(void)GetCountries:(id)sender detailDictionary:(id)details
{
}
我想在
RootViewController
的函数中调用此函数,例如RootController.m:
-(void)soapresult
{
//i want to call ""GetContries "" here..
}
我称这个
"soapresult"
为-(void)viewdidLoad
{
[self soapresult];
}
但是当调用函数时会崩溃
最佳答案
JewelsSharedController.h:
//...
-(void)GetCountries:(id)sender detailDictionary:(id)details;
//...
RootController.m:
#import "JewelsSharedController.h"
//...
-(void)soapresult
{
JewelsSharedController * jewelsSharedController = [[JewelsSharedController alloc] init];
[jewelsSharedController GetCountries:yourSender detailDictionary:yourDetails];
[jewelsSharedController release];
}