Skip to content

hamza-faroooq/Swift-NativeActionSheetManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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, hamza_faroooq@yahoo.com

License

MIT (Click Me O_o)

About

This class is used to make native ActionSheet as per requirements

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages