2
我使用基於視圖的應用程序模板創建了一個項目。關於presentModalViewController的問題
在我mainViewController
:
- (void)viewDidUnload {
// Release any retained subviews of the main view.
// e.g. self.myOutlet = nil;
UIImagePickerController *pickerController=[[UIImagePickerController alloc] init];
pickerController.sourceType=UIImagePickerControllerSourceTypeSavedPhotosAlbum;
pickerController.delegate=self;
[self presentModalViewController:pickerController animated:YES];
[pickerController release];
}
我實現委託了。
但是當我運行這個項目時,我沒有得到imagePicker
視圖。在屏幕上顯示mainViewController
的視圖,而不是imagePicker
視圖。
我犯了一些錯誤嗎?
謝謝!