Latest 0.1.2
Homepage https://github.com/muukii/UpperNotificationController
License MIT
Platforms ios 8.0, requires ARC
Authors

CI Status
Version
Carthage compatible
License
Platform

Usage

1. Define UIView of UpperNotificationViewType

public protocol UpperNotificationViewType: class {

    /**
     - parameter manualDismissClosure: Call this closure to dismiss the notification view
     */
    func didPrepare(dismissClosure: () -> Void)

    func willAppear()
    func didAppear()

    func willDisappear()
    func didDisappear()
}

class MyNotification: UpperNotificationViewType { … }

2. Define class or struct of UpperNotificationAnimatorType

public protocol UpperNotificationAnimatorType {

    func applyPresentAnimation<T where T: UpperNotificationViewType, T: UIView>(notificationView notificationView: T, completion: () -> Void)

    func applyDismissAnimation<T where T: UpperNotificationViewType, T: UIView>(notificationView notificationView: T, completion: () -> Void)
}

struct MyAnimator: UpperNotificationViewType { ... }

3. Create UpperNotificationController

let notificationController = UpperNotificationController()

4. Deliver notification


let notification = NotificationContext<SampleNotificationView> {
    SampleNotificationView()
}

notificationController.deliver(notification: notification, animator: Animator())

Requirements

iOS 8.0+

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

CocoaPods 0.39.0+ is required to build UpperNotificationController

To integrate UpperNotificationController into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'UpperNotificationController'

Then, run the following command:

$ pod install

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 UpperNotificationController into your Xcode project using Carthage, specify it in your Cartfile:

github "muukii/UpperNotificationController"

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

Author

muukii, [email protected]

License

UpperNotificationController is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "UpperNotificationController",
    "version": "0.1.2",
    "summary": "UpperNotificationController is core for appear notification to upper on app screen.",
    "homepage": "https://github.com/muukii/UpperNotificationController",
    "license": "MIT",
    "authors": {
        "muukii": "[email protected]"
    },
    "source": {
        "git": "https://github.com/muukii/UpperNotificationController.git",
        "tag": "0.1.2"
    },
    "social_media_url": "https://twitter.com/muukii0803",
    "platforms": {
        "ios": "8.0"
    },
    "requires_arc": true,
    "source_files": "UpperNotificationController/**/*.swift"
}

Pin It on Pinterest

Share This