iPad2 相机显示屏不显示
我有一个 iPhone 应用程序,它使用 UIImagePicker 显示相机来拍照。我将其移植到 iPad2,当我想显示相机(通过模态视图控制器)时,我得到相机按钮,但预览中的显示只是白色。如果我拍照我就能看到它。
你有这种情况吗?
I have an iPhone app that displays the camera using UIImagePicker to take a picture. I am porting it to iPad2 and when i want to display the camera (through a modalviewcontroller) i get the camera buttons but the display in the preview is just white. If i take the picture i can see it.
Does this happen to you?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我遇到了同样的问题。我将 UIImagePicker 代码移至我的 rootviewcontroller,并且它起作用了。我可以通过取景器看到实际情况。它也可以通过现有视图控制器中的弹出窗口(在根视图控制器之后调用)来工作,但是当我显示照片时,分辨率很差。这并不令人满意,但我想如果绝对必要的话我找到了解决方法。
I am experiencing the same problem. I moved the UIImagePicker code to my rootviewcontroller, and it worked. I could see what was actually through the viewfinder. It also worked via a popover in the existing viewcontroller (called next after the rootviewcontroller), but the resolution was poor when I displayed the photo. This is not satisfactory, but I guess I found a workaround if absolutely necessary.
昨天我才尝试过这个代码来使用相机拍照。来自我的应用程序,移植后它可以在 iPhone 上运行。
我认为你需要在控制器上调用 takePicture 方法。
只是一个猜测。
Yesterday only i have tried this code to use camera to take pics. from my app and it worked on iphone after porting it.
I think you need to call takePicture method on the controller.
Just a guess.