Skip to content

sferrini/SFSwiftNotification

Repository files navigation

SFSwiftNotification

Simple custom user notifications

(DEPRECATED AND NO LONGER MAINTAINED.)

Install

  • Copy the file SFSwiftNotification.swift into your project.

Usage

In your ViewController

var notificationView: SFSwiftNotification?

In viewDidLoad()

notificationView = SFSwiftNotification(frame: CGRectMake(0, 0, CGRectGetWidth(self.view.frame), 50),
                                       title: "This is an SFSwiftNotification",
                               animationType: .Collision,
                                   direction: .RightToLeft,
                                    delegate: self)
    
notificationView!.backgroundColor = UIColor.orangeColor()
notificationView!.label.textColor = UIColor.whiteColor()
    
self.view.addSubview(notificationView!)

To start the notification:

@IBAction func notify(sender : AnyObject) {
    
    self.notificationView!.animate(1)
}

Settings

AnimationTypes:

.Collision
.Bounce

Directions:

.TopToBottom
.LeftToRight
.RightToLeft

Screen

Demo DEFAULT

Demo DEFAULT

Demo DEFAULT

About

Simple custom user notifications in Swift (DEPRECATED)

Resources

License

Stars

Watchers

Forks

Packages

No packages published