Latest 1.0.3
Homepage https://github.com/limadeveloper/PickImageAlert
License MIT
Platforms ios 11.0, requires ARC
Dependencies SwiftLint
Frameworks UIKit
Authors

GitHub release
Build Status
CocoaPods
Language
Platform
License
Donate

PickImageAlert provides a list of your photos using the system alert controller. Also it’s possible to take a photo and access the photo library.

PickImageAlert

Requirements

  • iOS 11.0+
  • Swift 4.2+

Installation

CocoaPods

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

# Swift 4.2 or later
pod 'PickImageAlert', '~> 1.0'

and run pod install

How to use

Import library in your swift file:

import PickImageAlert

Setup PickImageAlert in your action:

let properties = PIAlertController.AlertProperties(
    title: "Pick Image",
    cameraActionTitle: "Camera",
    gallaryActionTitle: "Gallary",
    cancelActionTitle: "Cancel",
    style: .actionSheet
)

let pickImageAlert = PickImageAlert(with: self, alertProperties: properties)

pickImageAlert.pickImage { image in
    print("📷 selected photo: (image)")
}

And don’t forget to setup your info.plist file to require photo library access:

plist

Feature

  • Can change title and actions text;
  • Can access photo library;
  • Can take photo using the camera;
  • Auto layout support;
  • iPad support;

Communication

  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request. 👨🏻‍💻

License

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

Latest podspec

{
    "name": "PickImageAlert",
    "version": "1.0.3",
    "summary": "Photos or camera access using the system alert controller",
    "description": "PickImageAlert provides a list of your photos in your alert controller with three alert actions",
    "requires_arc": true,
    "homepage": "https://github.com/limadeveloper/PickImageAlert",
    "license": "MIT",
    "authors": {
        "John Lima": "[email protected]"
    },
    "social_media_url": "https://twitter.com/johncarloslima",
    "platforms": {
        "ios": "11.0"
    },
    "source": {
        "git": "https://github.com/limadeveloper/PickImageAlert.git",
        "tag": "1.0.3"
    },
    "frameworks": "UIKit",
    "source_files": "Framework/PickImageAlert/**/*.{swift}",
    "resources": "Framework/PickImageAlert/**/*.{png,jpeg,jpg,storyboard,xib,xcassets}",
    "swift_version": "4.2",
    "dependencies": {
        "SwiftLint": [
            "~> 0.28"
        ]
    }
}

Pin It on Pinterest

Share This