Code Monkey home page Code Monkey logo

crnotifications's Introduction

CRNotifications

CRNotifications are custom in-app notifications with 3 types of layouts. The notifications will animate in and out. They will hide when they are clicked on or with an automatic dismissal.

Screenshots


Notifications types
Success Error Info
alt text alt text alt text

How to use


Call CRNotifications.showNotification with a title, message, notification type and a time for how long the notification should appear. Should the notification not disappear automatically use a time of 0. You may also pass a completion block that is executed once the notification disappears.

Built-in notification types are : .success .error .info

Example:

CRNotifications.showNotification(type: CRNotifications.success, title: "Success!", message: "You successfully showed this notification.", dismissDelay: 3)

It is also possible to customize the notifications and provide your own custom style either by the method

showNotification(textColor:, backgroundColor: UIColor, image: UIImage?, title: String, message: String, dismissDelay: TimeInterval)

or by conforming to the CRNotificationType protocol:

protocol CRNotificationType {
    var textColor: UIColor { get }
    var backgroundColor: UIColor { get }
    var image: UIImage? { get }
}

Installation


Cocoapods install

Swift 4
pod 'CRNotifications'
Swift 3
pod 'CRNotifications', :git => 'https://github.com/dkcas11/CRNotifications.git', :branch => 'swift3'

Manual install

Drag the CRNotifications folder into your project and you are good to go.

Author & Contributors


Casper Riboe (Author)

Facebook : Casper Riboe
Twitter : dkcas11
Mail : [email protected]

Herrick Wolber (Contribution)

Twitter : estar2005
Github : Rico237
Mail : [email protected]

crnotifications's People

Contributors

dkcas11 avatar rico237 avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.