以下是显示我的相机的代码:
UIImagePickerController *imagePicker = [[UIImagePickerController alloc] init]; imagePicker.delegate = self; imagePicker.sourceType = UIImagePickerControllerSourceTypeCamera; objPopVIEw = [[UIPopoverController alloc] initWithContentVIEwController:imagePicker]; [objPopVIEw presentPopoverFromrect:CGRectMake(842,163,0) inVIEw:self.vIEw permittedArrowDirections:UIPopoverArrowDirectionRight animated:YES];
我的应用程序仅使用横向模式,现在图像旋转:
解决方法 正如 Apple’s Official Doc所说:Present the user interface. On iPhone or iPod touch,do this modally (full-screen) by calling the presentVIEwController:animated:completion: method of the currently active vIEw controller,passing your configured image picker controller as the new vIEw controller.
On iPad,the correct way to present an image picker depend on its source type,as summarized in this table:
Camera Photo: Use full screen library Saved: Must use a popover Photos Album: Must use a popover…
On iPad,if you specify a source type of UIImagePickerControllerSourceTypeCamera,you can present the image picker modally (full-screen) or by using a popover. However,Apple recommends that you present the camera interface only full-screen.
虽然说“你可以通过模式(全屏幕)或使用popover”来呈现图像选择器,但是通过使用popover将会看到这个奇怪的问题。我猜这可能是iOS 7 SDK的错误。
我仍然在努力解决这个问题,但现在我唯一可以告诉的方法就是以模式显示
-presentVIEwController:animated:completion:
方法,这是全屏幕的(其实我不喜欢这样)。
还有一个关于苹果开发论坛的THREAD讨论,你可以看看它。 总结
以上是内存溢出为你收集整理的ios 7图像选择器里面popover错误的行为全部内容,希望文章能够帮你解决ios 7图像选择器里面popover错误的行为所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)