简体   繁体   English

iPhone App中的实时相机问题

[英]Live Camera Problems in iPhone App

Question regarding an iPhone application we have developed which uses the live camera function. 有关我们开发的使用实时摄像功能的iPhone应用程序的问题。

Details: 细节:

  1. We are layering an adjustable semi-transparent image over the live camera feed 我们正在实时摄像机Feed上叠加可调整的半透明图像
  2. When the user adjusts the semi-transparent image to a location that happens to cover (in any part) the camera button, it renders the camera button unclickable and the user is left frustrated - unable to snap the photo. 当用户将半透明图像调整到恰好覆盖(任何部分)相机按钮的位置时,它将使相机按钮不可点击,并且使用户感到沮丧-无法拍摄照片。

Question: 题:

  1. Does anyone have a suggestion for how we might be able to overcome the default features of the camera function (ie: default is the camera bar and camera button are the bottom-most layer - and we haven't found a way to change it to a different, higher layer to allow for our semi-transparent image to be on the bottom to avoid the clicking problem)? 是否有人对我们如何克服摄像头功能的默认功能提出了建议(即:默认是摄像头栏和摄像头按钮是最底层的图层-我们还没有找到将其更改为一个不同的较高层,以使我们的半透明图像位于底部,以避免点击问题)?
  2. Can anyone think of a workaround that might work? 谁能想到一种可行的解决方法?

Thanks! 谢谢!

If OS 3.1 is an option for end-user phones, take a look at the new 3.1 camera APIs. 如果OS 3.1是最终用户电话的选项,请查看新的3.1相机API。 In summary, set the showsCameraControls property to NO, set the cameraOverlayview property to your own view, and use the takePicture method to hook up to your own control for taking the picture. 总而言之,将showsCameraControls属性设置为NO,将cameraOverlayview属性设置为您自己的视图,然后使用takePicture方法连接到您自己的控件以拍摄照片。 You'll also need to implement imagePickerController:didFinishPickingMediaWithInfo to save the image after the picture is taken. 您还需要实现imagePickerController:didFinishPickingMediaWithInfo以在拍摄照片后保存图像。

The goal, of course, is to eliminate the stock controls and use your own that you can control for placement. 当然,目标是消除库存控制,并使用自己可以控制的放置位置。

UIImagePickerController Class Reference UIImagePickerController类参考

has further information on the subject. 有关于该主题的更多信息。

You might also check out ARKit . 您也可以查看ARKit I haven't used it yet or had time to play with it. 我还没有使用过,或者没有时间玩它。 From looking at it, it seems like apple would not sanction it, but it seems to pick apart the UIImagePicker control to remove all the chrome around the view finder. 从外观上看,苹果似乎并没有批准它,但似乎可以分拆UIImagePicker控件以删除视图查找器周围的所有镶边。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM