xcode 自定义照片选择器视图

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15515407/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 03:01:30  来源:igfitidea点击:

Customized photo picker view

iosobjective-cxcodeuiimagepickercontroller

提问by Warbean

I want to use photo picker view in customized form, such as showing a rectangle in screen to focus on specified area of the picture. However, UIImagePickerController can only offer a normal photo picker view. Is there any other class I can use to replace UIImagePickerController, or should I create a sub class of UIImagePickerController?

我想以自定义形式使用照片选择器视图,例如在屏幕中显示一个矩形以专注于图片的指定区域。但是, UIImagePickerController 只能提供普通的照片选择器视图。是否有任何其他类可以用来替换 UIImagePickerController,还是应该创建 UIImagePickerController 的子类?

回答by Aravindhan

You can use ALAssetLibrary for designing your own ImagePicker. With the help of ALAsset library you can able to extract the photos and videos from the iOS album and use it in your own design.

您可以使用ALAsset库来设计您自己的 ImagePicker。借助 ALAsset 库,您可以从 iOS 相册中提取照片和视频,并将其用于您自己的设计中。

A good example to start with this is ELCImagePickerController

一个很好的例子是ELCImagePickerController