Giter Club home page Giter Club logo

rsbluralert's Introduction

RSBlurAlert

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

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

pod 'RSBlurAlert'

Usage

Import the module in file where you wish to use this alert:

import RSBlurAlert

After that initialize it and simply set it's properties.

let blurAlert = RSBlurAlertController()
blurAlert.alertTitle = "Attention"
blurAlert.alertDetail = "Describe the alert to the user using this so that user gets some idea."
blurAlert.alertImage = UIImage(named: "warning")

Along with this you can also use various customization options:

• This propety will help you keep the alert visible for customized time in seconds if you require so.

blurAlert.alertVisibleTime = 5

• This property will help you switch off the auto-hiding feature. If set to false, alert will be dismissed by user's tap on screen.

blurAlert.autoHide = false

• Presenting alert is as simple as presenting any view controller. Just present is without animation:

present(blurAlert, animated: false, completion: nil)

Image Size: The alert image that you want to use should have ideal size of 130 X 130 @1x and scale accordingly. If you have access to only horizotally rectangualr or vertically rectangular image, don't worry, the content mode of image view is 'Aspect Fit' hence your image will never get cropped.

Note: None of the above mentioned properties are compulsory or required. They are optional. Defaults are set to give enough functionality. I highly encourage to download the repo and have a look at Example project. All possibilites and features are describes there in easiest of context.

Author

Rohan Sanap, [email protected]

Twitter - @therohansanap

Credit where it's due

I started learning to make reusable frameworks and how to distribute them via Cocoapods. I stumbled upon following article.

This article is where my Idea came from. I decided to implement the same UI but with completely different approach and with alot of customization capabilites and hence RSBlurAlert was born

License

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

rsbluralert's People

Contributors

therohansanap avatar

Watchers

Carabineiro 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.