Latest 1.0.4
Homepage https://github.com/duriana/DUNotificationBanner
License MIT
Platforms ios 9.0
Dependencies TTLayoutSupport
Authors

A drop-in-solution to present banner notifications in any UIViewController.

Use this pod to display multiple in app notifications in real time it, the source of the notifications doesn’t matter, it can be from API or from scehduled events, it just works!.

This repository is maintained by the Duriana team at Duriana Internet.

Requirements

[Platform iOS]() ![Objective-c](https://img.shields.io/badge/Language-Objective C-blue.svg?style=flat)

Minimum iOS Target: iOS 9.0

Demo Project Included


DUNotificationBanner
DUNotificationBanner
DUNotificationBanner

Installation


Cocoapod Method:

DUNotificationBanner is available through CocoaPods, to install
it simply add the following line to your Podfile:

pod 'DUNotificationBanner'

How to use



// showing a banner in a UIViewController
// bannerView can be any UIView<DUNotificationBannerView>
[[DUNotificationBannerPresentationManager sharedManager] showBannerView:bannerView onViewController:self];

// hiding the a banner
[[DUNotificationBannerPresentationManager sharedManager] hideBannerView:bannerView];

How to Try it out


In the demo project there is a class DurianaNotificationBannerView which adds some neat functionalities like,

  • Interaction callback
  • Closing callback
  • Closing timer

DurianaNotificationBannerView *bannerView = [[NSBundle.mainBundle loadNibNamed:@"DurianaNotificationBannerView" owner:nil options:nil] objectAtIndex:0];
bannerView.lifetime = arc4random_uniform(5);
bannerView.interactionBlock = ^{
    NSLog(@"Interacted!");
};
bannerView.closeBlock = ^{
    NSLog(@"Closed!");
};
[[DUNotificationBannerPresentationManager sharedManager] showBannerView:bannerView onViewController:self];

TODO


  • Fix layout issues when using transparent navigation bar.

Contributions


Any contribution is more than welcome! You can contribute through pull requests and issues on GitHub.

Latest podspec

{
    "name": "DUNotificationBanner",
    "version": "1.0.4",
    "summary": "A drop-in-solution to present banner notifications in any UIViewController.",
    "description": "Use this pod to display in app notifications in real time it, the source of the notificationsndoesn't matter, it can be from API or from scehduled events, it just works!.",
    "homepage": "https://github.com/duriana/DUNotificationBanner",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "essame": "[email protected]com"
    },
    "source": {
        "git": "https://github.com/duriana/DUNotificationBanner.git",
        "tag": "1.0.4"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "DUNotificationBanner/Classes/**/*",
    "public_header_files": "DUNotificationBanner/Classes/DUNotificationBannerPresentationManager.h",
    "dependencies": {
        "TTLayoutSupport": [
            "~> 0.4.0"
        ]
    }
}

Pin It on Pinterest

Share This