|
| 1 | +# PickImageAlert |
| 2 | + |
| 3 | +PickImageAlert provides a list of your photos in your alert controller with three alert actions |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +```Swift |
| 8 | +let properties = PIAlertController.AlertProperties( |
| 9 | + title: "Pick Image", |
| 10 | + cameraActionTitle: "Camera", |
| 11 | + gallaryActionTitle: "Gallary", |
| 12 | + cancelActionTitle: "Cancel", |
| 13 | + style: .actionSheet |
| 14 | +) |
| 15 | + |
| 16 | +let pickImageAlert = PickImageAlert(with: self, alertProperties: properties) |
| 17 | + |
| 18 | +pickImageAlert.pickImage { image in |
| 19 | + print("📷 selected photo: \(image)") |
| 20 | +} |
| 21 | +``` |
| 22 | + |
| 23 | +[](https://github.com/limadeveloper/PickImageAlert/releases) |
| 24 | + |
| 25 | +[](https://cocoapods.org/pods/PickImageAlert) |
| 26 | +[](https://cocoapods.org/pods/PickImageAlert) |
| 27 | + |
| 28 | +## Feature |
| 29 | + |
| 30 | +- Can change title and actions text; |
| 31 | +- Can access photo library; |
| 32 | +- Can take photo using the camera; |
| 33 | +- Auto layout support; |
| 34 | +- iPad support; |
| 35 | + |
| 36 | +## Requirements |
| 37 | + |
| 38 | +- iOS 11.0+ |
| 39 | +- Swift 4.2+ |
| 40 | + |
| 41 | +## Installation |
| 42 | + |
| 43 | +### CocoaPods |
| 44 | + |
| 45 | +**PickImageAlert** is available through [CocoaPods](http://cocoapods.org). To install |
| 46 | +it, simply add the following line to your Podfile: |
| 47 | + |
| 48 | +```ruby |
| 49 | +# Swift 4.2 or later |
| 50 | +pod 'PickImageAlert', '~> 1.0' |
| 51 | +``` |
| 52 | + |
| 53 | +and run `pod install` |
| 54 | + |
| 55 | +## Change log |
| 56 | + |
| 57 | +Change log is [here](https://github.com/limadeveloper/PickImageAlert/blob/master/CHANGELOG.md). |
| 58 | + |
| 59 | +## Communication |
| 60 | + |
| 61 | +- If you found a bug, open an issue. |
| 62 | +- If you have a feature request, open an issue. |
| 63 | +- If you want to contribute, submit a pull request.:muscle: |
| 64 | + |
| 65 | +## License |
| 66 | + |
| 67 | +**PickImageAlert** is under MIT license. See the [LICENSE](LICENSE) file for more info. |
0 commit comments