Latest1.1.0
Homepagehttps://github.com/therohansanap/RSBlurAlert
LicenseMIT
Platformsios 9.0
FrameworksUIKit
Authors

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.

Latest podspec

{
    "name": "RSBlurAlert",
    "version": "1.1.0",
    "summary": "A macOS system like alert view for iOS.",
    "description": "A macOS system like alert view which has blur background, an alert image along with a short text describing the alert. This also contains some added control such as controlling auto-hide and the display time of alert view.",
    "homepage": "https://github.com/therohansanap/RSBlurAlert",
    "screenshots": [
        "https://image.ibb.co/koSDa8/Simulator_Screen_Shot_i_Phone_X_2018_06_11_at_15_58_53.png",
        "https://image.ibb.co/b8OVNo/Simulator_Screen_Shot_i_Phone_X_2018_06_11_at_15_58_55.png"
    ],
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Rohan Sanap": "[email protected]"
    },
    "source": {
        "git": "https://github.com/therohansanap/RSBlurAlert.git",
        "tag": "1.1.0"
    },
    "social_media_url": "https://twitter.com/therohansanap",
    "platforms": {
        "ios": "9.0"
    },
    "swift_version": "4.0",
    "source_files": "RSBlurAlert/Classes/**/*",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This