Latest 1.3.1
Homepage https://github.com/ilyainyushin/ISMessages
License MIT
Platforms ios 8.2
Authors

Version
CocoaPods
GitHub license

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

ISMessagesISMessages

Requirements

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

Features

  • Simple use actions
  • Call from anywhere in app

Installation

CocoaPods

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

target 'MyApp' do
  pod 'ISMessages'
end

Then run pod install.

Manual

Add ISMessages folder to your project

Usage

#import <ISMessages/ISMessages.h>

Presenting notification

All messages can simply presented without customization and callback action via static method call:

[ISMessages showCardAlertWithTitle:@"This is your title!" 
            message:@"This is your message!"  
            duration:3.f 
            hideOnSwipe:YES 
            hideOnTap:YES 
            alertType:ISAlertTypeSuccess 
            alertPosition:ISAlertPositionTop 
            didHide:^(BOOL finished) {
               NSLog(@"Alert did hide.");
            }];

Message with customization and callback action:

ISMessages* alert = [ISMessages cardAlertWithTitle:@"This is custom alert with callback"
                                message:@"This is your message!!"
                                iconImage:[UIImage imageNamed:@"Icon-40"]
                                duration:3.f
                                hideOnSwipe:YES
                                hideOnTap:YES
                                alertType:ISAlertTypeCustom
                                alertPosition:ISAlertPositionTop];

alert.titleLabelFont = [UIFont boldSystemFontOfSize:15.f];
alert.titleLabelTextColor = [UIColor blackColor];

alert.messageLabelFont = [UIFont italicSystemFontOfSize:13.f];
alert.messageLabelTextColor = [UIColor whiteColor];

alert.alertViewBackgroundColor = [UIColor colorWithRed:96.f/255.f 
                      green:184.f/255.f 
                      blue:237.f/255.f 
                      alpha:1.f];

[alert show:^{
     NSLog(@"Callback is working!");
} didHide:^(BOOL finished) {
     NSLog(@"Custom alert without image did hide.");
}];             

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

Hiding Messages

Notifications will hidden automatically after your duration or using static method

[ISMessages hideAlertAnimated:YES];

Also you can just tap/swipe {on} message to hide it.

Author

Ilya Inyushin

License

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

Latest podspec

{
    "name": "ISMessages",
    "version": "1.3.1",
    "summary": "This is simple extension for presenting system-wide notifications from top/bottom of device screen.",
    "homepage": "https://github.com/ilyainyushin/ISMessages",
    "screenshots": [
        "https://i.imgur.com/EJn2r0u.png",
        "https://i.imgur.com/EbSHVOL.png"
    ],
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Ilya Inyushin": "[email protected]"
    },
    "source": {
        "git": "https://github.com/ilyainyushin/ISMessages.git",
        "tag": "1.3.1"
    },
    "social_media_url": "https://twitter.com/trsaltn",
    "platforms": {
        "ios": "8.2"
    },
    "source_files": "ISMessages/Classes/**/*",
    "resource_bundles": {
        "ISMessages": [
            "ISMessages/Assets/*.png"
        ]
    }
}

Pin It on Pinterest

Share This