Latest 0.3.0
Homepage https://github.com/matybrennan/MBAlertController
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

MBAlertController is a library allows you dispaly adn present adaptive and customizable alerts that are outside the basic UIAlertController library. MBAlertController’s setup is almost identical to the native UIAlertController, making it very easy and simple to use.

simulator screen shot mar 25 2017 7 59 36 pm
simulator screen shot mar 25 2017 7 59 33 pm
simulator screen shot mar 25 2017 7 59 43 pm
simulator screen shot mar 25 2017 6 34 54 pm

Requirements


  • iOS 8.0+
  • Xcode 8+

CocoaPods


CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate MBAlertController into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'MBAlertController'

Then, run the following command:

$ pod install

Manually


  1. Download and drop /MBAlertController folder in your project.
  2. Congratulations!

Usage

let controller = MBAlertController(title: "Title", message: "The message for the alert.", style: .alert)        
let firstAction = MBAlertAction(title: "Okay", style: .default, handler: { action in
    print("ok")
})
controller.addAction(action: firstAction)
self.present(controller, animated: true, completion: nil)

Customisation


let controller = MBAlertController(title: "Title", message: "The message for the alert.", style: .alert)        

// backgroundColor for alertController
controller.view.backgroundColor

// which way to present alert from - defaults to .bottom
controller.direction -> [.top, .right, .left, .bottom]

// backgroundColor for alertView
controller.boxView.backgroundColor 

License


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

Latest podspec

{
    "name": "MBAlertController",
    "version": "0.3.0",
    "summary": "An elegant AlertController.",
    "description": "A short description of MBAlertController which display simple alert to leverage",
    "homepage": "https://github.com/matybrennan/MBAlertController",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "matybrennan": "matybrennan@gmail.com"
    },
    "source": {
        "git": "https://github.com/matybrennan/MBAlertController.git",
        "tag": "0.3.0"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "MBAlertController/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This