Home

Awesome

Notie

Build Status Cocoapods Compatible Docs Carthage Compatible Platform License

Undistracted in-app notification in Swift, with added buttons and input box.

Installation

CocoaPods

To integrate Notie 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 'Notie'

Then, run the following command:

$ pod install

And add import Notie to the top of the files using Notie.

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate Notie into your Xcode project using Carthage, specify it in your Cartfile:

github "thii/Notie"

Run carthage to build the framework and drag the built Notie.framework into your Xcode project.

Usage

Example

Show a notification with Confirm style

let notie = Notie(view: self.view, message: "Are you sure you want to do that?", style: .Confirm)

notie.leftButtonAction = {
	// Add your left button action here
    notie.dismiss()
}

notie.rightButtonAction = {
	// Add your right button action here
    notie.dismiss()
}

notie.show()

Or, if you want just a standard notification

	let notie = Notie(view: self.view, message: "This is a notification!", style: .Confirm)


    notie.buttonCount = Notie.buttons.standard

    notie.leftButtonAction = {
            notie.dismiss()
     }


     notie.show()

Parameters

The following parameters can be modified to customize the appearance of the notification.

Functions

Requirements

iOS 9 or greater.

License

Notie is released under the MIT license. See LICENSE for details.