Skip to content

winterrain5/ImagePickerSwift

Repository files navigation

ImagePickerSwift

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Useage

选择照片

ImagePicker.show(type: .selectPhoto, with: .default) { (image, url) in
    self.imageView.image = image
}

选择视频

ImagePicker.show(type:.selectVideo, with: .default) { (image, url) in
    self.imageView.image = image
    self.videoUrl = url
}

选择视频和图片

ImagePicker.show(type:.selectePhotoAndVideo, with: .default) { (image, url) in
    self.imageView.image = image
    self.videoUrl = url
}

拍照

let options = ImagePickerOptions()
options.cameraDevice = .front
ImagePicker.show(type:.takePhoto, with: .default) { (image, url) in
    self.imageView.image = image
    self.videoUrl = url
}

录制视频

ImagePicker.show(type:.recordVideo, with: .default) { (image, url) in
    self.imageView.image = image
    self.videoUrl = url
}

Requirements

Installation

ImagePickerSwift is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'ImagePickerSwift'

Author

winterrain5, [email protected]

License

ImagePickerSwift is available under the MIT license. See the LICENSE file for more info.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published