我正在解析一个XML Web 服务,解析完成后我想调用另一个方法。但是我的代码在解析过程中调用了该方法。我想要的是等到解析过程结束。这是我的代码:
ArsivNoCheck *arsivNoCheck = [ArsivNoCheck alloc];
[arsivNoCheck checkArsivNo:_txtArsivNo.text]; //Here I call parsing method in another class
//Here I call the method
[self performSelectorOnMainThread:@selector(sampleMethod) withObject:nil waitUntilDone:YES];
-(void) sampleMethod
{
//some code
}