Skip to content

Common Top NotificationView Creator with injection subview.

License

Notifications You must be signed in to change notification settings

voya-ai/PGNotificationView

 
 

Repository files navigation

PGNotificationView

CI Status Version License Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

appetize.io demo : [ here ]

It's notification view creator (uiwindow).

just send your custom view and then some setups, and call show().

it's' very comfortable notificationview.

1. create > show

NotificationView.create(YourNotiView("hello")).show()

2. create > setup(duration) > show

NotificationView.create(YourNotiView("hello")).setupDuration(present: 0.3, dismiss: 0.3, expose: 3).show()

3. create > setup(touch) > show

NotificationView.create(YourNotiView("hello")).whenTouch { view in
    print("third notification touched.")
}.show()

4. create > setup(completion) > show

NotificationView.create(YourNotiView("hello")).whenCompletion { completed in
    print("hide completion.")
}.show()

5. create > combine setups > show

// you can choose setup methods.
NotificationView.create(YourNotiView("hello"))
  .setupDuration(present: 0.3, dismiss: 0.3, expose: 3)
  .whenTouch { view in
      print("third notification touched.")
  }.whenCompletion { completed in
      print("hide completion.")
  }.show()

6. find old notification view that not deinit yet.

//find last.
NotificationView.find(YourNotiView.self)?.hide()

//find all type.
NotificationView.findAll(YourNotiView.self)?.forEach({ notiview in
    // do something.
})

Requirements

  • above ios 8.0
  • swift 3.0
  • with cocoapods

Installation

is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod "PGNotificationView"

Author

ipagong, [email protected]

License

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

About

Common Top NotificationView Creator with injection subview.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 54.2%
  • Swift 37.6%
  • Objective-C 4.7%
  • Ruby 3.5%