我正在打开一个通过XML加载更新的ModelViewController
在ViewController.m中
LoadUpdatesView *luv = [[LoadUpdatesView alloc] initWithNibName:@"LoadUpdatesView" bundle:nil];
luv.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentModalViewController:luv animated:YES];
在LoadUpdatesView.m
中- (void)viewDidLoad {
[self xmlloadUpdates];
}
xmlloadUpdates
- (void) xmlloadUpdates {
statusmessage.text = @"Start loading Updates";
NSString * path = @"xxx.xml";
[self parseXMLFileAtURL:path];
for(int iX = 0; iX < [stories count]; iX++) {
statusmessage.text = @"Loading %@ of %@ entries",iX,[stories count];
}
}
但是,模态窗口仅在xmlloadUpdates通过xml加载更新后显示。但是我想首先显示模态窗口,然后开始执行XML工作(xmlloadupdates在模态窗口上显示状态消息)
答案 0 :(得分:1)