iOS:UIImagePickerController默认UI可以修改吗?
我正在为客户开发一个小型相机应用程序,现在我已经完成了它的所有功能。在标准相机控件中,我需要修改一件事,取消按钮应该显示画廊。 但除非我遗漏了一些东西,否则我需要通过将showsCameraControls设置为NO来删除覆盖,然后从头开始构建整个overlayView。 我已经找到了这个解决方案,但由于警告 开头,我不敢走这条路帖子。
那么,是否有任何有效的方法可以对现有的相机覆盖控制 UI 进行简单的小修改,或者如果您需要更改一件事,是否必须从头开始构建它?
I am working with a small camera app for a client and I have now finished all functionality of it. In the standard camera controls i need to modify one thing , the cancel button should say gallery instead.
But unless i am missing something i will need to remove the overlay by setting showsCameraControls
to NO and then building my entire overlayView from scratch.
I have found this solution but I am afraid to go this route due to the warning in the beginning of the post.
So is there any valid way of doing simple small modifications to the existing camera overlay control UI or do you have to build it from scratch if you need to change one tiiiiiiny thing?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不幸的是,在这种情况下,我可以有把握地说您需要从头开始构建控件。您实际上只有两种选择:创建自己的相机叠加层,或使用默认的相机叠加层。
现在,您可以使用您引用的链接中描述的技术,迭代各种子视图并“盲目”修改它们。这样做的一个相当大的危险是,每次苹果改变图像选择器的内部结构时,它都可能会破坏你的解决方案。所以我肯定会远离它。
Unfortunately, having been in this situation I can safely say you need to build the controls from scratch. You really only have two options: create your own camera overlay, or use the default one.
Now, you could use the techniques described in the link you cite, and iterate through the various subviews and modify them 'blind'. The rather large danger with this is every time Apple change the internal structure of the image picker it could potentially break your solution. So I'd definitely stay clear of it.