Latest 0.0.3
Homepage https://github.com/sferrini/SFSwiftNotification
License MIT
Platforms ios 7.0, requires ARC
Authors

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

Latest podspec

{
    "name": "SFSwiftNotification",
    "version": "0.0.3",
    "summary": "Simple custom user notifications (UIView subclass)",
    "homepage": "https://github.com/sferrini/SFSwiftNotification",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Simone Ferrini": "[email protected]"
    },
    "source": {
        "git": "https://github.com/sferrini/SFSwiftNotification.git",
        "tag": "0.0.3"
    },
    "social_media_url": "https://twitter.com/Simone_Ferrini",
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "Classes/*.swift"
}

Pin It on Pinterest

Share This