GithubHelp home page GithubHelp logo

hamza-faroooq / swift-nativeactionsheetmanager Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 4.61 MB

This class is used to make native ActionSheet as per requirements

License: MIT License

Swift 100.00%
swift xcode actionsheet actionsheetios uiactionsheet

swift-nativeactionsheetmanager's Introduction

Introduction

Hi, Humans!

My name is Hamza Farooq and I love 'Swift' programming. I always try to implement new ideas. Do check Swift-TopViewController for this ActionSheetManager to work

Swift-NativeActionSheetManager

This class is used to make native ActionSheet as per requirements

Images

Simple Usage

Do the following simple steps to add this Manager class in your project and present ActionSheets without code redundancy

First of all follow this link to add the Swift-TopViewController in your project. Because this file is used to present this ActionSheet

Then, simply download or copy this code and place it in your project. (Click on the link, this will take you to the directory where ActionSheetManager is placed)

If you do not want to add Swift-TopViewController in your project. then you can modify ActionSheetManager on your on

Example

ActionSheetManager.actionSheetDynamic(buttonTitlesArray: ["Take Picture", "Choose From Library"], successCallBack: { (callBackText) in

    if callBackText == "Take Picture" {
        
        // do camera stuff here
        
    } else {
    
        // do gallary stuff here
        
    }
    
}) {
    print("nothing")
}
  • You can also pass your custom title and message strings as follows:
ActionSheetManager.actionSheetDynamic(title: "Action", message: "Choose Options", buttonTitlesArray: ["Take Picture", "Choose From Library"], successCallBack: { (callBackText) in

That's it.

I uses this class for my own personal use, if you want to use some other methods or want to modify this class on your own, you can. :-)

Contributions

Your contributions are most welcomed. Do let me know if you find any kind of issue while using this file. Please open an issue to discuss that problem. Thanks

Auther

Hamza Farooq, [email protected]

License

MIT (Click Me O_o)

swift-nativeactionsheetmanager's People

Contributors

hamza-faroooq avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

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.