ImagePickerView allows you to combine UIImageView and UIImagePicker in one line of code. Also adds Document Picker with single line of code to any UIView. Ready to use in Storyboard or Programmatic coding.
Swift Package Manager
In Xcode go to File
-> Add Packages
and insert uArl:
https://github.com/uzayaltiner/ImagePickerView
import ImagePickerView
Usage
let imageView = ImagePickerView()
view.addSubview(imageView)
Thats all!
Properties (more to come)
imageView.placeholder = UIImage(named: "your_asset")
imageView.color = .yourColor
imageView.cornerRadius = 10
imageView.onImagePicker = { selectedImage in
// After selecting the image, you can perform the operations you want to do here.
}
Usage
let exampleView = UIView()
exampleView.setupDocumentPicker { url in
// After selecting the document's url path, you can perform the operations you want to do here.
}
view.addSubview(exampleView)
I made this to improve myself and we can add more features for expand the library. If you want to help, feel free to create PR.
For your requests and suggestions, you can contact with me from uzayaltiner@gmail.com