UIImagePickerController与iPhone和iPad的不同之处 [英] UIImagePickerController differences from iPhone and iPad woes

查看:100
本文介绍了UIImagePickerController与iPhone和iPad的不同之处的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个专为iPhone设计的应用程序,它使用了UIImagePickerController.

I have an app designed for iPhone that makes use of the UIImagePickerController.

该应用只能横向运行,直到图像选择器以其默认肖像进入视图为止.

The app run in landscape only up until the image picker comes into view in its default portrait.

问题1: 在iPhone上,当我将设备旋转为纵向以查看图像库时,图像选择器视图似乎在进行翻转,好像从横向旋转为纵向一样?

Problem 1: On the iPhone when I rotate the device to portrait to view the image library the image picker view seems to do a flip as if rotating from landscape to portrait?

问题2: 我收到了使用两阶段旋转动画的可怕警告.要使用更平滑的单阶段动画,此应用程序必须删除两阶段方法的实现.

Problem 2: I get the dreaded warning Using two-stage rotation animation. To use the smoother single-stage animation, this application must remove two-stage method implementations.

问题3. 在iPad上选择图像时,图像选择器被关闭并且视图返回横向,但是......如果我执行任何需要警报视图或键盘的操作,则它们看起来好像设备是纵向的?在iPhone上不会发生这种情况?

Problem 3. on the iPad when selecting an image the image picker is dismissed and the view is back in landscape but ...... if I then do anything that requires alert view or the keyboard they appear as if the device is in portrait? This does not happen on the iPhone???

我知道问题2是一个长期存在的问题,但是任何人都可以对问题1和问题进行帮助. 3?

I know problem 2 is a long running issue but please can anyone help with problems 1 & 3?

谢谢

推荐答案

第3条已解决:-)

键盘将显示在状态栏的方向上,由于某些原因,该方向并不总是随旋转而变化.因此,如果您只想在横向集[UIApplication sharedApplication] .statusBarOrientation = UIInterfaceOrientationLandscapeLeft;中显示该视图,或者无论您希望在viewWillAppear方法中选择哪种方向."

"The keyboard will show up in the orientation of the statusbar, which doesn't always change with rotations for some reason. So if you want to display that view only in landscape set [UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationLandscapeLeft; or whichever orientation you want to prefer in your viewWillAppear method."

这篇关于UIImagePickerController与iPhone和iPad的不同之处的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆