简体   繁体   English

可以自定义相机和用户照片库视图吗?

[英]Possible to customize camera and user photo library views?

Maybe this is the wrong place for this (if so, please help guide me where I should ask this). 也许这是错误的地方(如果是,请帮助我指导我该问的地方)。 Would it be possible (or even an acceptable iOS practice) to customize: 是否可以(甚至是可接受的iOS惯例)自定义:

  1. The screen that shows when a user takes a photo. 用户拍摄照片时显示的屏幕。
  2. The screen that shows when a user accesses their photo library. 用户访问其照片库时显示的屏幕。

Thanks in advance! 提前致谢!

Both these screens are provided by the UIImagePickerController class. 这两个屏幕均由UIImagePickerController类提供。 You can handily customize the screen to take a photo - there's even API for it. 您可以方便地自定义屏幕以拍摄照片-甚至还有API。 You would first set showsCameraControls to NO to prevent the controller from drawing its own controls, then set a value for the cameraOverlayView property to insert your own controls over the camera. 您首先需要将showsCameraControls设置为NO以防止控制器绘制其自己的控件,然后为cameraOverlayView属性设置一个值以在cameraOverlayView上插入您自己的控件。 Take a look at the UIImagePickerController docs for more. 查看更多有关UIImagePickerController的文档

By contrast, you should not customize the photo library picker - that's a more traditional navigation interface, and Apple hasn't exposed any extra API to customize how it appears. 相比之下,您不应该自定义照片库选择器-这是一种更为传统的导航界面,并且Apple尚未公开任何其他API来自定义其外观。 You could (of course) always start poking into the view hierarchy of the controller once it's onscreen, but I think that would be a little more startling to your users than customizing the camera, and is more prone to break if Apple changes the guts of UIImagePickerController. 您可以(当然)总是在控制器显示在屏幕上时开始查看它的视图层次结构,但是我认为这比自定义相机给您的用户更多的震惊,并且如果苹果改变了它的胆量,它更容易被破坏。的UIImagePickerController。

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

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