ios - 在向UIImagePickerController中添加自定义视图时,如何定位视图的位置?
怪我咯
怪我咯 2017-04-17 15:16:59
0
1
593

Rt

想要在拍照时让取景器中心出现一个十字,在通过UIImagePickerControllercameraOverlayView属性添加十字的视图时,如何定位才能放到取景器的中心呢?很明显取景器视图中心位置和屏幕的中心位置并没有重合。而且UIImagePickerController的视图结构是私有的,没办法得到任何关于取景器视图范围的信息。

thx

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all (1)
伊谢尔伦

Statement

I don’t have any specific practice myself, sorry. What the questioner means is that the center point cannot be obtained?

Quote

Since I didn’t write it myself, I tried to quote the article, hoping it can help the questioner.

The following article introduces:这个代码就可以实现拍照功能了,如果把注释掉的代码加上就可以添加overlayview,比如十字准星,条形码扫描框之类的

Reference: Implementation of UIImagePickerController obtaining photos and adding overlay method

    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!