我與需要兩個iOS6的和iOS7 支持UIModalPresentationFormSheet
(modalPresentationStyle
)未在iOS7工作UIImagePickerController
(相機),但它是一個應用程序工作在iOS6中運行良好。UIModalPresentationFormSheet不iOS7
我該怎麼辦?
我與需要兩個iOS6的和iOS7 支持UIModalPresentationFormSheet
(modalPresentationStyle
)未在iOS7工作UIImagePickerController
(相機),但它是一個應用程序工作在iOS6中運行良好。UIModalPresentationFormSheet不iOS7
我該怎麼辦?
根據Apple's documentation of UIImagePickerController
,它應該顯示在彈出窗口內。如果你無法適應這種情況,你可能不得不推出自己的產品,或者使用開放源代碼。
您可以使用下面的代碼從ipad和iphone中獲取來自Camera或Gallery的圖像。就像在ipad中一樣,你無法使用本模式控制器來獲取圖像。
if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad) {
UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:picker];
[popover presentPopoverFromRect:self.selectedImageView.bounds inView:self.selectedImageView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
self.popOver = popover;
} else {
[self presentViewController:picker animated:YES completion:nil];
}
當您進行此更改時是否收到任何類型的錯誤消息或編譯器錯誤? –