0
問題我有下面的代碼,當UIToolBar上的相機按鈕被按下時啓動iPad的相機。但是每當視圖被解散時,工具欄就會雙擊。我不確定它爲什麼這樣做。它突然變得很高。iPad的相機導致我的UIToolBar
UIImagePickerController *pickerController = [[[UIImagePickerController alloc] init] autorelease];
pickerController.delegate = self;
pickerController.sourceType = UIImagePickerControllerSourceTypeCamera;
pickerController.showsCameraControls = YES;
if (self.isProfileFlag)
{
//test
}
else
{
pickerController.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType: UIImagePickerControllerSourceTypeCamera];
pickerController.showsCameraControls = YES;
}
[self.topLevelParent presentModalViewController:pickerController animated: false];
並關閉它,我有:picker dismissModalViewControllerAnimated:TRUE];
但是,一旦我旋轉屏幕,工具欄恢復正常,直到我再次打開相機。