CRToast alternatives and similar libraries
Based on the "Alerts" category.
Alternatively, view CRToast alternatives based on common mentions on social networks and blogs.
-
NotificationBanner
The easiest way to display highly customizable in app notification banners in iOS -
JDStatusBarNotification
Highly customizable & feature rich notifications. Interactive dismiss. Custom Views. SwiftUI. Tap-to-hold. Progress. Written in Swift, compatible for ObjC! -
Whisper
:mega: Whisper is a component that will make the task of display messages and in-app notifications simple. It has three different views inside -
PMAlertController
PMAlertController is a great and customizable alert that can substitute UIAlertController -
Jelly
🌊 - Jelly is a library for animated, non-interactive & interactive viewcontroller transitions and presentations with the focus on a simple and yet flexible API. -
RMDateSelectionViewController
This is an iOS control for selecting a date using UIDatePicker in an UIAlertController like manner -
CDAlertView
Highly customizable alertview and alert/notification/success/error/alarm popup written in Swift -
CFAlertViewController
It is a highly configurable iOS library which allows easy styling with built in styles as well as extra header and footer views so that you can make extremely unique alerts and action sheets. -
TTGSnackbar
TTGSnackbar shows simple message and action button on the bottom or top of the screen with multi kinds of animation, which is written in Swift3 and inspired by Snackbar in Android. It also support showing custom view, icon image or multi action button. -
Swift-Prompts
A Swift library to design custom prompts with a great scope of options to choose from. -
RMActionController
This is an iOS control for presenting any UIView in an UIAlertController like manner -
DOAlertController
Simple Alert View written in Swift, which can be used as a UIAlertController. (AlertController/AlertView/ActionSheet) -
RMPickerViewController
This is an iOS control for selecting something using UIPickerView in an UIAlertController like manner -
BPStatusBarAlert
BPStatusBarAlert is a library that allows you to easily make text-based alert that appear on the status bar and below navigation bar. -
RAlertView
AlertView, Ios popup window, A pop-up framework, Can be simple and convenient to join your project. IOS 提示框,IOS弹框,IOS弹窗 -
SnowGlobeFramework
Snow globe framework is delightful / slightly cheese easter egg for christmas season. Turns your awesome app into a snow globe, when user shake the device. -
AlertViewLoveNotification
A simple and attractive AlertView to ask permission to your users for Push Notification.
CodeRabbit: AI Code Reviews for Developers
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of CRToast or a related project?
README
CRToast
CRToast
is a library that allows you to easily create notifications that appear on top of or by pushing out the status bar or navigation bar. CRToast
was originally based on CWStatusBarNotification.
[demo](screenshots/demo.gif)
Requirements
CRToast
uses ARC and requires iOS 7.0+. Works for iPhone and iPad.
Installation
CocoaPods
pod 'CRToast', '~> 0.0.7'
Carthage
github "cruffenach/CRToast"
Manual
Add the project or source files to your own project.
Usage
Notifications can be created through CRToastManager
's showNotificationWithOptions:completionBlock:
This will queue up a notification with the options specified. You provide options for your notification in a dictionary using the keys in CRToast.h
Example
This code
NSDictionary *options = @{
kCRToastTextKey : @"Hello World!",
kCRToastTextAlignmentKey : @(NSTextAlignmentCenter),
kCRToastBackgroundColorKey : [UIColor redColor],
kCRToastAnimationInTypeKey : @(CRToastAnimationTypeGravity),
kCRToastAnimationOutTypeKey : @(CRToastAnimationTypeGravity),
kCRToastAnimationInDirectionKey : @(CRToastAnimationDirectionLeft),
kCRToastAnimationOutDirectionKey : @(CRToastAnimationDirectionRight)
};
[CRToastManager showNotificationWithOptions:options
completionBlock:^{
NSLog(@"Completed");
}];
Generates this
[](screenshots/red_notification.gif)
Customization
CRToast
is very customizable. Taking a hint from UIStringDrawing
's drawInRect:withAttributes:
book, notifications are created with dictionaries filled with all their options.
Customizing Appearance
CRToast
allows for setting of
- Left aligned image
Title and Subtitle text with:
- Text Color
- Text Font
- Text Alignment
- Text Color
- Text Shadow Color
- Text Shadow Offset
- Text Max Number of Lines
Customizing Animation
CRToast
also allows for animation customization. This includes.
- Animation Type (Linear, Spring or Gravity)
- Animation Physics Coefficients (Spring Damping, Spring Initial Velocity, Gravity Magnitude)
- Presentation Type (Slide over bars or push content out)
- Status visibility (Status bar on top or below)
- Direction (Enter and exit in any direction)
- Enter, Stay on Screen and Exit Timing
Touch Interactions
CRToast
allows for any notification to respond to different types of touch interactions (tap, swipe). Interaction responders can be set as defaults or on a per notification basis.
The types of interactions you can set up to respond to are:
CRToastInteractionTypeSwipeUp
CRToastInteractionTypeSwipeLeft
CRToastInteractionTypeSwipeDown
CRToastInteractionTypeSwipeRight
CRToastInteractionTypeTapOnce
CRToastInteractionTypeTapTwice
CRToastInteractionTypeTwoFingerTapOnce
CRToastInteractionTypeTwoFingerTapTwice
There are also wild card interaction types which cover a range of interactions
CRToastInteractionTypeSwipe
CRToastInteractionTypeTap
CRToastInteractionTypeAll
Any interaction can be responded to using a CRToastInteractionResponder
, they can be made with the following constructor
+ (instancetype)interactionResponderWithInteractionType:(CRToastInteractionType)interactionType
automaticallyDismiss:(BOOL)automaticallyDismiss
block:(void (^)(CRToastInteractionType interactionType))block;
You can set a collection of CRToastInteractionResponder
s as the object for the key kCRToastInteractionRespondersKey
in defaults to have all notifications respond to a certain interaction, or on any given one to have the interaction responders just work for that one notification.
Persistent and Programmatically Dismissed Notifications
You can also dismiss the current notification at any time with
+ (void)dismissNotification:(BOOL)animated;
You can present notifications that must be dismissed by the user by passing @(DBL_MAX)
for kCRToastTimeIntervalKey
and setting up an interaction responder that will dismiss the notification.
Setting Defaults
There are sane defaults set for all properties, however you can set a default set of options for your application's notifications using CRToastManagers
's setDefaultOptions:
.
License
The MIT License (MIT)
Copyright (c) 2013 Collin Ruffenach
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*Note that all licence references and agreements mentioned in the CRToast README section above
are relevant to that project's source code only.