How to show all camera controls with/for UIImagePickerController?

前端 未结 2 1938
野性不改
野性不改 2021-01-25 17:20

I have trouble showing the camera controls when using UIImagePickerController. Specifically, I need to be able to select between slo-mo, video, photo, square and pano.

T

相关标签:
2条回答
  • 2021-01-25 18:16

    UIImagePickerController came out in iOS 2.0, and was probably modern, in its time:

    https://developer.apple.com/documentation/uikit/uiimagepickercontroller?language=objc

    What you see are "standard controls".

    Even today the modern documentation points to the legacy (Objective-C era docs)

    The styling of the chrome has changed, but as they say: "the song remains the same."

    There are hooks to hide standard controls, and then you can add your own customer controls to operate the camera programatically. I have a pet project to make a version of time-lapse, etc.

    But for serious projects, Apple suggests using the AV frameworks, and although I haven't started using them, I certainly agree.

    0 讨论(0)
  • 2021-01-25 18:19

    UIImagePickerController doesn't give you Apple's whole Camera app to use inside of your own app. Not all of the functionality of the Camera app is available. You can print available media types by calling -[UIImagePicker availableMediaTypesForSourceType:] and you'll find that you get kUTTypeImage and kUTTypeMovie.

    Square, slo-mo, time-lapse, and panorama functionalities are not provided by UIImagePickerController.

    0 讨论(0)
提交回复
热议问题