Latest 1.0.0
Homepage https://github.com/jesster2k10/Flat-Alert
License MIT
Platforms ios 9.0
Authors

Flat Alert

A simple, lightweight, flat alternative to UIAlertController written in Swift for iOS

Sreenshots


alt
alt

Features


  • [x] Header View
  • [x] Title
  • [x] Description message
  • [x] Customizations: fonts, colors, dimensions & more
  • [x] 1, 2 buttons (horizontally) or 3+ buttons (vertically)
  • [x] Closure when a button is pressed
  • [x] Similar implementation to UIAlertController
  • [x] Cocoapods
  • [x] Animation with UIKit Dynamics
  • [x] Objective-C compatibility
  • [x] Swift 2.3 & Swift 3 support

Requirements


  • iOS 9.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 Flat Alert into your Xcode project using CocoaPods, specify it in your Podfile:

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

pod 'Flat-Alert'

Then, run the following command:

$ pod install

Manually


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

Usage


The usage is very similar to UIAlertController.
Flat Alert has two styles: Alert & Walkthrough.

Show a simple alert with two button


//Create the alert
        let alert = FlatAlert(title: "Flat Alert", message: "Wow, dosen't this look amazing? I am completely astonished by this work that I must donate via PayPal immediately!", style: .alert)
        //create the action
        let action = FlatAlertAction(title: "Ok", style: .normal) { 
            print("Pressed ok action")
        }

        //add the action
        alert.add(action: action)

        //present the alert
        present(alert, animated: true, completion: nil)

Contributing

  • If you need help or you’d like to ask a general question, open an issue.
  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

MIT License


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

Latest podspec

{
    "name": "Flat-Alert",
    "version": "1.0.0",
    "summary": "A simple, lightweight, flat alternative to UIAlertController written in Swift for iOS",
    "description": "Flat Alert is an iOS drop-in framework that displays a modern, flat stylenalert with a number of avalibale options to customise the appearance.  nFlat Alert is meant as a replacement for the undocumented, private UIKit UIAlertController.",
    "homepage": "https://github.com/jesster2k10/Flat-Alert",
    "screenshots": [
        "http://i.imgur.com/2K3Muml.png",
        "http://i.imgur.com/4QSDh0P.png",
        "http://i.imgur.com/LUR8Vec.png"
    ],
    "license": {
        "type": "MIT",
        "file": "LICENSE.md"
    },
    "authors": {
        "Jesse Onolememen": "[email protected]"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source": {
        "git": "https://github.com/jesster2k10/Flat-Alert.git",
        "tag": "1.0.0"
    },
    "source_files": [
        "FlatAlert/Library/*.swift",
        "FlatAlert/*.h"
    ],
    "resources": [
        "FlatAlert/*.plist",
        "FlatAlert/Library/*.xib"
    ],
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This