In-app notification in Swift, with customizable buttons and input text field.

Overview

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.

  • style: The style of the notification. .Confirm style includes message view and two confirm buttons. .Input style adds an extra input text field. Default to .Confirm.

  • leftButtonAction: A block to call when the user taps on the left button.

  • rightButtonAction: A block to call when the user taps on the right button.

  • leftButtonTitle: The title of the left button. Default to OK.

  • rightButtonTitle: The title of the left button. Default to Cancel.

  • placeholder: The placeholder of the input text field. Default to nil.

  • animationDuration: How long the slide down animation should last.

  • messageBackgroundColor: The background color of the message view.

  • messageTextColor: The text color of the message view. Default to white color.

  • inputFieldBackgroundColor: The background color of the input text field. Default to white color.

  • inputFieldTextColor: The text color of the input text field. Default to dark gray.

  • leftButtonBackgroundColor: The background color of the left button.

  • leftButtonTextColor: The text color of the left button. Default to white color.

  • rightButtonBackgroundColor: The background color of the right button.

  • rightButtonTextColor: The text color of the right button. Default to white color.

  • buttonCount: The button configuration, defaults to Notie.buttonCount.standard (two buttons). When the value is set to Notie.buttonCount.single, the action defaults to the left button.

  • keyboardType: The UIKeyboardType to use

Functions

  • getText() returns a String value of the text when using a .Input style

Requirements

iOS 9 or greater.

License

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

You might also like...
Emulates the native Remote Notification View.
Emulates the native Remote Notification View.

Introduction HDNotificationView appears notification view like system. Requirement iOS 9.0+ Installation Carthage github "nhdang103/HDNotificationView

Simple app to help understanding the spoken text in islamic prayers.
Simple app to help understanding the spoken text in islamic prayers.

About • Community Forum • App Store • Donation • Contributing • License About You regularly pray your prayers in Arabic, but do not really understand

BPStatusBarAlert is a library that allows you to easily make text-based alert that appear on the status bar and below navigation bar.
BPStatusBarAlert is a library that allows you to easily make text-based alert that appear on the status bar and below navigation bar.

BPStatusBarAlert BPStatusBarAlert is a library that allows you to easily make text-based alert that appear on the status bar and below navigation bar.

Fully customizable and extensible action sheet controller written in Swift
Fully customizable and extensible action sheet controller written in Swift

XLActionController By XMARTLABS. XLActionController is an extensible library to quickly create any custom action sheet controller. Examples The action

Customizable simple Alert and simple ActionSheet for Swift
Customizable simple Alert and simple ActionSheet for Swift

SimpleAlert It is simple and easily customizable alert. Can be used as UIAlertController. Appetize's Demo Requirements Swift 5.0 iOS 9.0 or later How

PMAlertController is a great and customizable alert that can substitute UIAlertController
PMAlertController is a great and customizable alert that can substitute UIAlertController

PMAlertController is a small library that allows you to substitute Apple's uncustomizable UIAlertController, with a beautiful and totally customizable

💌 Easy to use and customizable messages/notifications for iOS à la Tweetbot

Notice: TSMessages is no longer being maintained/updated. We recommend everyone migrate to RMessage. This repository will be kept as is for those who

[iOS] Easy, customizable notifications displayed on top of the statusbar. With progress and activity. iPhone X ready.
[iOS] Easy, customizable notifications displayed on top of the statusbar. With progress and activity. iPhone X ready.

JDStatusBarNotification Show messages on top of the status bar. Customizable colors, font and animation. Supports progress display and can show an act

PMAlertController is a great and customizable alert that can substitute UIAlertController
PMAlertController is a great and customizable alert that can substitute UIAlertController

PMAlertController is a small library that allows you to substitute Apple's uncustomizable UIAlertController, with a beautiful and totally customizable

Comments
  • Change name of cocoapods repo

    Change name of cocoapods repo

    Very cool of you to make an iOS version of https://github.com/jaredreich/notie.js... but I'm already working on the official iOS version of notie.js, so could you please change the name of the cocoapods repo (https://cocoapods.org/?q=notie) so that I can use the official name that I originally came up with? It would be very much appreciated...

    opened by jaredreich 2
  • Added a way to change the keyboardType for the inputField and now input field becomes first responder

    Added a way to change the keyboardType for the inputField and now input field becomes first responder

    This feature would be awesome for anyone who needs a different keyboard type. Also the input should become the first responder so that the user does not have to click the text area to start typing.

    opened by ballerabdude 1
  • Getting an error

    Getting an error

    I'm running the latest version of Xcode and getting the following error:

    '(view: UIView!, message: String, style: _)' (aka '(view: ImplicitlyUnwrappedOptional, message: String, style: _)') is not convertible to '(view: UIView, title: String?, message: String?, style: NotieStyle)' (aka '(view: UIView, title: Optional, message: Optional, style: NotieStyle)'), tuples have a different number of elements

    when I try to declare an instance of the class. What should I do? Thanks

    opened by csr 1
Owner
Thi Doãn
Thi Doãn
The easiest way to display highly customizable in app notification banners in iOS

Written in Swift 5 NotificationBanner is an extremely customizable and lightweight library that makes the task of displaying in app notification banne

Dalton Hinterscher 4.5k Jan 9, 2023
Highly customizable alertview and alert/notification/success/error/alarm popup written in Swift

CDAlertView is highly customizable alert popup written in Swift. Usage is similar to UIAlertController. Screenshots Animations Usage Basic usage witho

Candost Dagdeviren 1.1k Dec 30, 2022
OEANotification is a customizable notification view framework

OEANotification OEANotification is an iOS library which provides to create notifications and customize them easily. You can create notifications with

Ömer Aslan 19 Jan 30, 2021
Action sheet allows including your custom views and buttons.

CustomizableActionSheet Action sheet allows including your custom views and buttons. Installation CocoaPods Edit your Podfile: pod 'CustomizableAction

Ryuta Kibe 191 Nov 26, 2021
BeautyAlert - BeautyAlert provides alerts with custom shapes, colors, buttons

BeautyAlert helps you can easily design by determining the color, shape, and sha

chacha 17 Sep 8, 2022
Swift library to manage in app notification in swift language, like WhatsApp, Telegram, Frind, ecc.

InAppNotify - Manage in App notifications During develop of my app Frind, I needed to manage in app notifications like whatsapp or telegram, but i did

Luca Becchetti 438 Nov 20, 2022
A crisp in-app notification/message banner built in Swift.

RMessage Screenshots Intro Welcome to RMessage! RMessage is a simple notification library written in Swift to help you display notification on the scr

Adonis Peralta 407 Nov 29, 2022
A simple and attractive AlertView to ask permission to your users for Push Notification.

A simple and attractive AlertView **to ask permission to your users for Push Notification.** PRESENTATION Ask permission to user for push notification

Boisney Philippe 37 Mar 23, 2022
A lightweight dropdown notification for iOS 7+, in Swift.

BRYXBanner A lightweight dropdown banner for iOS 7+. Usage Import BRYXBanner import BRYXBanner Create a banner using the designated initializer. let b

Bryx, Inc 1k Nov 20, 2022
A modern iOS toast view that can fit your notification needs

CRToast CRToast is a library that allows you to easily create notifications that appear on top of or by pushing out the status bar or navigation bar.

Collin Ruffenach 4.2k Dec 30, 2022