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 はモーダル ウィンドウにステータス メッセージを表示する)。