All Projects → josshad → Ehplainalert

josshad / Ehplainalert

Licence: mit
Plain style IOS alert

Projects that are alternatives of or similar to Ehplainalert

SpaceView
No description or website provided.
Stars: ✭ 58 (+31.82%)
Mutual labels:  notifications, alert, message
Ismessages
This is simple extension for presenting system-wide notifications from top/bottom of device screen.
Stars: ✭ 299 (+579.55%)
Mutual labels:  notifications, cocoapods, alert
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 (+8350%)
Mutual labels:  notifications, message
Siren
Siren checks a user's currently installed version of your iOS app against the version that is currently available in the App Store.
Stars: ✭ 3,892 (+8745.45%)
Mutual labels:  cocoapods, alert
Badgehub
A way to quickly add a notification badge icon to any view. Make any view of a full-fledged animated notification center.
Stars: ✭ 592 (+1245.45%)
Mutual labels:  notifications, cocoapods
Ftindicator
A light wight UI package contains local notification, progress HUD, toast, with blur effect, elegant API and themes support.
Stars: ✭ 292 (+563.64%)
Mutual labels:  notifications, cocoapods
Glnotificationbar
GLNotificationBar is a ios10 style notification bar, can be used to handle push notification in active state.
Stars: ✭ 306 (+595.45%)
Mutual labels:  notifications, cocoapods
Tsmessages
💌 Easy to use and customizable messages/notifications for iOS à la Tweetbot
Stars: ✭ 4,927 (+11097.73%)
Mutual labels:  notifications, cocoapods
Razor.SweetAlert2
A Razor class library for interacting with SweetAlert2
Stars: ✭ 98 (+122.73%)
Mutual labels:  notifications, alert
Fftoast
A very powerful iOS message notifications and AlertView extensions. It can be easily realized from the top of the screen, the bottom of the screen and the middle of the screen pops up a notification. You can easily customize the pop-up View.
Stars: ✭ 649 (+1375%)
Mutual labels:  message, alert
Swiftoverlays
SwiftOverlays is a Swift GUI library for displaying various popups and notifications
Stars: ✭ 621 (+1311.36%)
Mutual labels:  notifications, cocoapods
Notie
🔔 a clean and simple notification, input, and selection suite for javascript, with no dependencies
Stars: ✭ 6,170 (+13922.73%)
Mutual labels:  notifications, alert
checkmk-telegram-notify
Get alerted by Check_MK via Telegram bash script
Stars: ✭ 28 (-36.36%)
Mutual labels:  notifications, alert
Sclalertview
Beautiful animated Alert View. Written in Objective-C
Stars: ✭ 3,426 (+7686.36%)
Mutual labels:  cocoapods, alert
Statusalert
Display Apple system-like self-hiding status alerts. It is well suited for notifying user without interrupting user flow in iOS-like way.
Stars: ✭ 809 (+1738.64%)
Mutual labels:  cocoapods, alert
Overhang.js
🔔 A jQuery plugin for notifications, prompts and confirmations.
Stars: ✭ 437 (+893.18%)
Mutual labels:  notifications, alert
mac-ibm-notifications
macOS agent used to display custom notifications and alerts to the end user.
Stars: ✭ 206 (+368.18%)
Mutual labels:  notifications, alert
mobile-message
基于移动端的弹窗组件,默认提供info、success、warning、error、alert、confirm、multiple、vertical、bottomSheet、prompt,可自定义弹窗。它可以包含任何Html内容可以自定义弹窗的样式,也可以加入自定以的弹窗动画。
Stars: ✭ 13 (-70.45%)
Mutual labels:  alert, message
Gsmessages
A simple style messages/notifications, in Swift.
Stars: ✭ 595 (+1252.27%)
Mutual labels:  notifications, message
Lcactionsheet
一款简约而不失强大的 ActionSheet,微博、微信和 QQ 都采用了极其类似的样式,完全支持 Swift。
Stars: ✭ 809 (+1738.64%)
Mutual labels:  cocoapods, alert

EHPlainAlert

This is simple extension for presenting multiple system-wide notifications from bottom of device screen.

Requirements

  • Requires iOS 7.1 or later
  • Requires Automatic Reference Counting (ARC)

##Features

  • Supports multiple messages on one screen
  • Simple use actions
  • Highly customizable
  • Call from anywhere in app

Installation

CocoaPods

To install EHPlainAlert using CocoaPods, please integrate it in your existing Podfile, or create a new Podfile:

platform :ios, '7.1'

target 'MyApp' do
  pod 'EHPlainAlert'
end

Then run pod install.

Usage

#import <EHPlainAlert/EHPlainAlert.h>

Presenting notification

All messages can simply presented via static method call:

[EHPlainAlert showAlertWithTitle:@"Success" message:@"Something works!" type:ViewAlertSuccess];

Messages can be displayed from any location in app, even not associated with UI.

[[NetHelper sharedInstance] postRequestWithURLString:URL data:data withSuccess:^(id responseObject) {
        [EHPlainAlert showAlertWithTitle:@"Success" message:@"Data successfully uploaded" type:ViewAlertSuccess];
    } failure:^(NSError *error)
    {
        [EHPlainAlert showError:error];
    }];

Presenting error notification

For simplifying error handling you can use:

- (void)someError:(NSError *)myError
{
	[EHPlainAlert showError:error];
}

Hiding Messages

Notifications will hidden automatically after 4 seconds.

To change default delay use static method: [EHPlainAlert updateHidingDelay:2.5f];

Also you can just tap on message to hide it.

On Tap Actions

You can change the default behavior for tapping on the notification:

EHPlainAlert * ehAlert = [[EHPlainAlert alloc] initWithTitle:@"Hmm..." message:@"Tap for information" type:ViewAlertInfo];
ehAlert.action = ^{
    [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://github.com/josshad/EHPlainAlert"]];
};
[ehAlert show];

Customization

Fonts:

Change font of one alert

EHPlainAlert * ehAlert = [[EHPlainAlert alloc] initWithTitle:@"Info" message:@"This is info message" type:ViewAlertInfo];
ehAlert.titleFont = [UIFont fontWithName:@"TrebuchetMS" size:15];
ehAlert.subTitleFont = [UIFont fontWithName:@"TrebuchetMS-Italic" size:12];
[ehAlert show];

Change fonts for alert type

[EHPlainAlert updateTitleFont:[UIFont fontWithName:@"TrebuchetMS" size:18]];
[EHPlainAlert updateSubTitleFont:[UIFont fontWithName:@"TrebuchetMS" size:10]];

Colors:

Change background color of one alert

EHPlainAlert * ehAlert = [[EHPlainAlert alloc] initWithTitle:@"Hmm..." message:@"Blue color alert" type:ViewAlertInfo];
ehAlert.messageColor = [UIColor blueColor];
[ehAlert show];

Change color for alert type

[EHPlainAlert updateAlertColor:[UIColor colorWithWhite:0 alpha:0.5] forType:ViewAlertPanic];

Appearance

[EHPlainAlert updateAlertPosition:ViewAlertPositionTop];

Icons:

Change icon of one alert

EHPlainAlert * ehAlert = [[EHPlainAlert alloc] initWithTitle:@"Hmm..." message:@"Blue color alert" type:ViewAlertInfo];
ehAlert.iconImage = image;
[ehAlert show];

Change icon for alert type

[EHPlainAlert updateAlertIcon:image forType:ViewAlertInfo]; 

Number of messages

[EHPlainAlert updateNumberOfAlerts:4];

Display time

[EHPlainAlert updateHidingDelay:2.5f];

Author

Danila Gusev

[email protected]

License

Usage is provided under the MIT License. See LICENSE for full details.

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].