سؤال

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:

  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. You can handily customize the screen to take a photo - there's even API for it. 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. Take a look at the UIImagePickerController docs for more.

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. 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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top