All Projects → donileo → Rmessage

donileo / Rmessage

Licence: mit
A crisp in-app notification/message banner built in Swift.

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Rmessage

Chronos
📊 📊 📊 Monitors the health and web traffic of servers, microservices, and containers with real-time data monitoring and receive automated notifications over Slack or email.
Stars: ✭ 347 (-13.9%)
Mutual labels:  notifications
Pnotify
Beautiful JavaScript notifications with Web Notifications support.
Stars: ✭ 3,601 (+793.55%)
Mutual labels:  notifications
React Native Notifee
⚛️ A feature rich notifications library for React Native Android & iOS, built by @invertase, the authors of @react-native-firebase.
Stars: ✭ 381 (-5.46%)
Mutual labels:  notifications
Sysend.js
Send messages between open pages or tabs in same browser
Stars: ✭ 347 (-13.9%)
Mutual labels:  notifications
Apnotic
A Ruby APNs HTTP/2 gem able to provide instant feedback.
Stars: ✭ 360 (-10.67%)
Mutual labels:  notifications
Anahita
Anahita is a platform and framework for developing open science and knowledge sharing applications on a social networking foundation.
Stars: ✭ 369 (-8.44%)
Mutual labels:  notifications
Onesignal Website Sdk
OneSignal is a push notification service for web and mobile apps. This SDK makes it easy to integrate your website with OneSignal Push Notifications. https://onesignal.com
Stars: ✭ 338 (-16.13%)
Mutual labels:  notifications
Done
A fish-shell package to automatically receive notifications when long processes finish.
Stars: ✭ 394 (-2.23%)
Mutual labels:  notifications
Notifications
🛎 Notifications Center engine like GitHub or other application for any Rails applications.
Stars: ✭ 359 (-10.92%)
Mutual labels:  notifications
Parse Server
API server module for Node/Express
Stars: ✭ 19,165 (+4655.58%)
Mutual labels:  notifications
Reactnative Animation Challenges
A series of animation challenges in React Native.
Stars: ✭ 352 (-12.66%)
Mutual labels:  notifications
Csp Useful
Collection of scripts, thoughts about CSP (Content Security Policy)
Stars: ✭ 354 (-12.16%)
Mutual labels:  notifications
Onesignal Ios Sdk
OneSignal is a free push notification service for mobile apps. This plugin makes it easy to integrate your native iOS app with OneSignal. https://onesignal.com
Stars: ✭ 370 (-8.19%)
Mutual labels:  notifications
Pg Listen
📡 PostgreSQL LISTEN & NOTIFY for node.js that finally works.
Stars: ✭ 348 (-13.65%)
Mutual labels:  notifications
Active delivery
Ruby framework for keeping all types of notifications (mailers, push notifications, whatever) in one place
Stars: ✭ 388 (-3.72%)
Mutual labels:  notifications
Vapor Apns
Simple APNS Library for Vapor (Swift)
Stars: ✭ 344 (-14.64%)
Mutual labels:  notifications
Laravel Onesignal
OneSignal Push Notifications for Laravel
Stars: ✭ 369 (-8.44%)
Mutual labels:  notifications
Tautulli
A Python based monitoring and tracking tool for Plex Media Server.
Stars: ✭ 4,152 (+930.27%)
Mutual labels:  notifications
Titlenotifier.js
👋 Lightweight (< 3kb), dependency-free javascript library to dynamically show the number of unread notifications in your webpage title through a simple API.
Stars: ✭ 391 (-2.98%)
Mutual labels:  notifications
Whisper
📣 Whisper is a component that will make the task of display messages and in-app notifications simple. It has three different views inside
Stars: ✭ 3,718 (+822.58%)
Mutual labels:  notifications

RMessage

Twitter: @donileo Version License Platform

Screenshots

ErrorUnder

SuccessUnder

ErrorOver

WarningOver

Intro

Welcome to RMessage! RMessage is a simple notification library written in Swift to help you display notification on the screen. Many many customization options are available such as what position of the screen to present in, what colors should be applied to the title, body, background, etc, etc. There are many customizable properties and they can be viewed at the RMessageSpec protocol definition in the RMessageSpec file.

Get in contact with the developer on Twitter: donileo (Adonis Peralta)

3.0.0 Release

RMessage 3.0.0 is finally here with many new features from 2.x.x:

  • Rewritten in Swift.
  • Message notification designs are now easily specified in code via the RMessageSpec protocol - no more passing in design styles via a json design file.
  • Support for generic UIViews for the Left/Right/Background of the message. Want to pass a UIButton for the left view or background view? Go ahead.
  • Support for Attributed string stylings.
  • Support for new message duration types such as messages that can only be dismissed by tapping, or swiping, or both.
  • Support for canceling messages already in the queue waiting to be presented.
  • Support for Carthage.
  • Groundwork for custom animator objects via the RMessageAnimator Protocol has been set, support for passing in your own animators coming soon.

Note: RMessage now requires iOS 11.0 and Swift 4.1. So be sure you are ok with not supporting devices below these targets when using RMessage. If you aren't ready to commit to these version of iOS yet feel free to use RMessage 2.x.x until you can.

Installation

CocoaPods

For installation via CocoaPods add the following line to your Podfile:

pod "RMessage" #This will install the latest
#pod "RMessage", '~> 2.3.0' # This will install RMessage versions of 2.3.x based on ObjC

Carthage

For installation via Carthage add the following line to your Cartfile:

github "donileo/RMessage" ~> 3.0

Manually

For manual installation copy the all the source files in the Sources folder to your project.

Usage

To show a simple notification using the predefined "errorSpec" styling, animating from the top do the following:

// Create an instance of RMController, a controller object which handles the presentation
// of multiples messages on the screen
let rControl = RMController()

// Tell rControl to present the message
rControl.showMessage(
      withSpec: errorSpec,
      title: "Your Title",
      body: "A description"
)

To show your own button on the right, an icon (UIImage) on the left and animate from the bottom do this:

let rControl = RMController()
rControl.showMessage(
      withSpec: normalSpec,
      atPosition: .bottom,
      title: "Update available",
      body: "Please update the app",
      leftView: myIconImage,
      rightView: myUIButtonHere
)

To set a default view controller to present in and bypass the "internal presentation view controller detection":

   let rControl = RMController()
   rControl.presentationViewController = myViewController

   ...

   // All messages now presented by this controller will always be on myViewController
   rControl.showMessage(....)

Want to further customize a notification message right before its presented? Do the following:

   let rControl = RMController()
   rControl.delegate = self

   ...

   // Now lets implement the RMControllerDelegate customize(message:controller:) method which
   // RMController calls right before presenting:
   func customize(message: RMessage) {
   message.alpha = 0.4
   message.addSubview(aView)
  }

Feel like declaring your own custom message stylings? Simple!

let rControl = RMController()

// Customize the message, by using the DefaultRMessageSpec as your base.
// The DefaultRMessageSpec object is a struct with default values for a
// "default" RMessageSpec styling. All we need to do is pick up the the defaults
// from it and then just specify which variables we want customized. For a list
// of all the possible vars take a look at its definition!
var customSpec = DefaultRMessageSpec()
customSpec.backgroundColor = .red
customSpec.titleColor = .white
customSpec.bodyColor = .white
customSpec.iconImage = UIImage(named: "MyIcon.png")

// How about a custom spec based on the predefined warningSpec but with
// attributed string attributes for the title and body text?
var attrWarningSpec = warningSpec
attrWarningSpec.titleAttributes = [.backgroundColor: UIColor.red, .foregroundColor: UIColor.white]
attrWarningSpec.bodyAttributes = [
.backgroundColor: UIColor.blue, .foregroundColor: UIColor.white,
.underlineStyle: NSUnderlineStyle.styleSingle.rawValue,
]

// Now lets present Tell the RMController to present the message with your custom stylings.
rControl.showMessage(
      withSpec: customSpec,
      title: "I'm custom",
      body: "Nice!"
    )

Want to present a message that only disappers when tapped?

let rControl = RMController()

var tapOnlySpec = DefaultRMessageSpec()
tapOnlySpec.durationType = .tap

// Present it
rControl.showMessage(
      withSpec: tapOnlySpec,
      title: "Tap me Tap me!",
      body: "If you don't I wont dismiss!"
)

Want more examples? Take a look at the DemoViewController file in the RMessage project to see how to use this library. Its very simple.

License

RMessage is available under the MIT license. See the LICENSE file for more information.

Recent Changes

Can be found in the releases section of this repo.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].