Coder Social home page Coder Social logo

thejohnlima / pickimagealert Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 3.25 MB

📸 Photos or camera access using the system alert controller

License: MIT License

Swift 89.08% Objective-C 2.57% Ruby 8.35%
swift alert actionsheet library cocoapods photos camera photo-library alert-controller framework

pickimagealert's Introduction

PickImageAlert


PickImageAlert shows 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 5.0+

⚒ Installation

CocoaPods

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

# Swift 5.0 or later
pod 'PickImageAlert'

and run pod install

🎓 How to use

Import library in your swift file:

import PickImageAlert

Setup PickImageAlert in your action:

let properties = PIAlertProperties(
    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 alert action title;
  • Can change the color of alert action;
  • Can add icons to alert action;
  • 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.

☕️ Support

Buy Me A Coffee

pickimagealert's People

Contributors

dependabot[bot] avatar thejohnlima avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

mohsinalimat

pickimagealert's Issues

How to get the image url

How to get the image url when choose in Camera and gallery library.
Can you please help me how to get it
I have a requirement.

How to get the Image URL

How to get the image url when choose in Camera and gallery library.
Can you please help me how to get it
I have a requirement.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.