Custom in-app notifications.

Overview

CRNotifications

CRNotifications are custom in-app notifications with 3 types of layouts. The notifications will animate in and out. They will hide when they are clicked on or with an automatic dismissal.

Screenshots


Notifications types
Success Error Info
alt text alt text alt text

How to use


Call CRNotifications.showNotification with a title, message, notification type and a time for how long the notification should appear. Should the notification not disappear automatically use a time of 0. You may also pass a completion block that is executed once the notification disappears.

Built-in notification types are : .success .error .info

Example:

CRNotifications.showNotification(type: CRNotifications.success, title: "Success!", message: "You successfully showed this notification.", dismissDelay: 3)

It is also possible to customize the notifications and provide your own custom style either by the method

showNotification(textColor:, backgroundColor: UIColor, image: UIImage?, title: String, message: String, dismissDelay: TimeInterval)

or by conforming to the CRNotificationType protocol:

protocol CRNotificationType {
    var textColor: UIColor { get }
    var backgroundColor: UIColor { get }
    var image: UIImage? { get }
}

Installation


Cocoapods install

Swift 5
pod 'CRNotifications'
Swift 4.2
pod 'CRNotifications', :git => 'https://github.com/dkcas11/CRNotifications.git', :branch => 'swift4-2'
Swift 3
pod 'CRNotifications', :git => 'https://github.com/dkcas11/CRNotifications.git', :branch => 'swift3'

Manual install

Drag the CRNotifications folder into your project and you are good to go.

Author & Contributors


Casper Riboe (Author)

Facebook : Casper Riboe
Twitter : dkcas11
Mail : [email protected]

Herrick Wolber (Contribution)

Twitter : estar2005
Github : Rico237
Mail : [email protected]

Comments
  • Custom Background Color and swipe up

    Custom Background Color and swipe up

    Hey

    this library works great for my project. However the styles don't fit the theme of my App. So I build a little extension that allows to pass a custom background color.

    This is more a solution to get my problem fixed. A better solution might be, to let the CRNotificationType be a Class that include the color (and maybe border, shadows, etc.). There could be a couple of static variables that return the defaults for info, error, etc., that will be passed as a parameter, but user could still create a new instance with custom properties. I could work on something like this, if you see this benefitial.

    opened by xremix 9
  • New logo/Icon

    New logo/Icon

    Hi, I am a graphic designer, I want to help others in graphic design.

    After I reviewed your project, your logo on this project not attractive . Therefore I want to contribute to this project by creating a new logo / icon. what do you think?

    enhancement 
    opened by mansya 8
  • issue when i try present  CRNotifications

    issue when i try present CRNotifications

    u've issue when i try display CRNotifications

    in this class CRNotifications

    UIApplication.shared.keyWindow?.rootViewController.view.addSubview(view) but i fix it .....

    adding parms showNotification(type: CRNotificationType, title: String, message: String, dismissDelay: Int , viewController : UIViewController )

    because when i try implement pushView controller or segue the CRNotifications Displayed in the previous VC

    so... viewController.view.addSubview(view)

    it's work

    opened by adelbios 7
  • Add possibility to react to notification tap via new CRNotificationDelegate

    Add possibility to react to notification tap via new CRNotificationDelegate

    I think this is a neat little functionality expanding the cool & simple to use CRNotification! :) It also does not change the API so it is backwards compatible, only if needed, a delegate can be set. It is also very simple to comply with the delegate.

    If you want a more fancy feature, one could also include the text (or other information) of the notification in the delegate call.

    As this is my first pull request on GitHub, please take a look and let me know if I need to improve something or if you don't like the feature 😄

    opened by sansha 6
  • Enhancement request - show more then 2 lines of text

    Enhancement request - show more then 2 lines of text

    Love this, but would like to be able to show a larger box with more lines of text for some notifications. Can you modify it so the box resizes automatically based on the length of the message text, please?

    enhancement 
    opened by saldous 4
  • Added Swift version to podspec

    Added Swift version to podspec

    CRNotifications will not build for me in Xcode 10.1 unless I manually change the Swift version in the pod settings. This PR fixes it by specifying the swift version in the podspec.

    opened by mplorentz 2
  • Spring cleaning and protocols

    Spring cleaning and protocols

    • Changed the CRNotificationType from an enum to a protocol allowing for customisation.
    • Added a swipe gesture recogniser to the the CRNotification view for dismissal.
    • Updated the CRNotification view's constraints for better layout on different screens.
    opened by dkcas11 0
Releases(1.2.1)
Owner
Casper Riboe
iOS Developer @shape.
Casper Riboe
Push notifications allow developers to reach users, even when users aren't actively using an app!

Push notifications allow developers to reach users, even when users aren't actively using an app! With the latest update of iOS Apple provide very useful extensions which are user-friendly. In this tutorial, I am going to share the configuration, set up of Notification with the media attachments like.

MindInventory 16 Mar 3, 2022
Facebook Analytics In-App Notifications Framework

Facebook In-App Notifications enables you to create rich and customizable in-app notifications and deliver them via push notifications, based on the a

Meta Archive 496 Nov 17, 2022
Library to send mock remote notifications to the iOS simulator

SimulatorRemoteNotifications SimulatorRemoteNotifications is a library to send mock remote notifications to the iOS simulator. The library extends UIA

Arnaud Coomans 1.4k Dec 20, 2022
Pushkin is a free open source tool for sending push notifications

Unmaintained This repository is no longer maintained. Pushkin Introduction Pushkin is a free open source tool for sending push notifications. It was d

Nordeus 257 Nov 3, 2022
Easily create Local Notifications in swift - Wrapper of UserNotifications Framework

In IOS 10, apple updated their library for Notifications and separated Local and push notifications to a new framework: User Notifications This librar

Devesh Laungani 208 Dec 14, 2022
See all your scheduled local notifications in one place

ScheduledNotificationsViewController Nice Photon is available for hire! Talk to

Nice Photon 171 Oct 8, 2022
Gently notifies you about 'important' GitHub notifications

OctoBlast Gently notifies you about important GitHub notifications Setup Personal access token Head to preferences, and pop in your a new GitHub perso

Jason Watson 6 Nov 14, 2022
Custom notification view

Custom notification view

Ivan Kopiev 2 Sep 15, 2022
OS X app for sending push with Apple Push Notification service (APNs)

pushHandle OS X app for sending push with Apple Push Notification service (APNs) About This app was created just to allow painless testing of push not

hbk3 3 Nov 17, 2022
Custom in-app notifications.

CRNotifications CRNotifications are custom in-app notifications with 3 types of layouts. The notifications will animate in and out. They will hide whe

Casper Riboe 112 Sep 2, 2022
A SwiftUI iOS App and Vapor Server to send push notifications fueled by Siri Shortcuts.

Puffery An iOS App written in SwiftUI to send push notifications fueled by Siri Shortcuts. You can follow other's channels and directly receive update

Valentin Knabel 29 Oct 17, 2022
Push notifications allow developers to reach users, even when users aren't actively using an app!

Push notifications allow developers to reach users, even when users aren't actively using an app! With the latest update of iOS Apple provide very useful extensions which are user-friendly. In this tutorial, I am going to share the configuration, set up of Notification with the media attachments like.

MindInventory 16 Mar 3, 2022
Whisper is a component that will make the task of display messages and in-app notifications simple. It has three different views inside

Description ?? Break the silence of your UI, whispering, shouting or whistling at it. Whisper is a component that will make the task of displaying mes

HyperRedink 3.7k Dec 25, 2022
Simple Swift in-app notifications

LNRSimpleNotifications TSMessages is an amazingly powerful in-app notifications library but requires a lot of setup. LNRSimpleNotifications is a simpl

LISNR 203 Nov 20, 2022
Facebook Analytics In-App Notifications Framework

Facebook In-App Notifications enables you to create rich and customizable in-app notifications and deliver them via push notifications, based on the a

Meta Archive 496 Nov 17, 2022
CoffeeToast - A swift package to easily add Toast notifications to your app

CoffeeToast A simple Swift package to add Toast Notifications to your app. Insta

Maegan Wilson 2 Feb 3, 2022
Koronavilkku - the official COVID-19 Exposure Notifications app

Koronavilkku iOS app Koronavilkku is the official COVID-19 Exposure Notifications app for Finland, maintained by the Finnish Institute for Health and

Finnish Institute for Health and Welfare (THL) 76 Oct 7, 2022
Facebook Analytics In-App Notifications Framework

Facebook In-App Notifications enables you to create rich and customizable in-app notifications and deliver them via push notifications, based on the a

Meta Archive 496 Nov 17, 2022
Apple Push Notifications (APNs) Server-Side library.

Perfect-Notifications 简体中文 APNs remote Notifications for Perfect. This package adds push notification support to your server. Send notifications to iO

PerfectlySoft Inc. 113 Oct 28, 2022
A simple style messages/notifications, in Swift.

Demo Example To show notifications use the following code: self.showMessage("Something success", type: .success) To display a notice on a view: view.s

Gesen 704 Dec 17, 2022