0
我发现问题是我调用showNextView的地方。我有另一个接口的webService,我与服务器通信和解析xml。当解析完成时使用方法parserDidEndDocument我在调用委托方法,其中更改了视图并显示模态视图。但是当我调用所有的方法时,它将返回到endDocument和xmlParseChunk等等。它看起来像parserDidEndDocument不是真的最后一个方法,不知何故与导航控制器混淆。当我通过按钮调用showig nextView的方法。在parserDidEndDocument中显示模态视图
正在处理按钮的代码。在从parserDidEndDocument调用的委托方法中工作不正确。
-(void)showNextView
{
UIViewController *nextView = [self.storyboard instantiateViewControllerWithIdentifier:@"vcTrabantInfo"];
[[nextView navigationController] setNavigationBarHidden:NO animated:NO];
[[self navigationController] pushViewController:nextView animated:YES];
UIViewController *picker = [[UIViewController alloc] init];
[picker setModalPresentationStyle:UIModalPresentationFormSheet];
[[self navigationController] presentModalViewController:picker animated:YES];
}
像往常一样,问题出在键盘和座位之间。问题是,我调用另一个模态视图之前,我的模态视图没有被解雇:)。请记住,所有操作都是在viewDidDisappear中完成的。 – kubo 2012-03-01 16:53:16