<commit_before><p align="center">
    <img width="900px" src="banner.png">
</p>

<p align="center">
<img src="http://img.shields.io/travis/<NAME>/UINotifications.svg?style=flat"/>
<img src="https://img.shields.io/cocoapods/v/UINotifications.svg?style=flat"/>
<img src="https://img.shields.io/cocoapods/l/UINotifications.svg?style=flat"/>
<img src="https://img.shields.io/cocoapods/p/UINotifications.svg?style=flat"/>
<img src="https://img.shields.io/badge/License-MIT-yellow.svg?style=flat"/>
</p>

- [Features](#features)
- [Example](#example)
- [Requirements](#requirements)
- [Usage](#usage)
    - [Making a Notification](#making-a-notification)
    - [Create a custom style](#create-a-custom-style)
    - [Use a custom dismiss trigger](#use-a-custom-dismiss-trigger)
    - [Create a custom UINotificationView](#create-a-custom-uinotificationview)
    - [Create a custom presenter](#create-a-custom-presenter)
- [Communication](#communication)
- [Installation](#installation)
- [License](#license)

## Features
- [x] Present your own custom view easily as an in-app Notification
- [x] Create custom presentation styles
- [x] Update content during presentation

## Example

To run the example project, clone the repo, and open `UINotifications-Example.xcodeproj` from the Example directory.

![Albums list](Assets/succes_notification.png?raw=true)
![Camera Roll](Assets/failure_notification.png?raw=true)

## Requirements
- Swift 3.0, 3.1, 3.2
- iOS 8.0+
- Xcode 8.1, 8.2, 8.3

## Usage

### Making a Notification

```swift
import UINotifications

let content = UINotificationContent(title: "My Custom Text", chevronImage: UIImage(named: "MyChevron"))
let notification = UINotification(content: content, action: UINotificationCallbackAction(callback: {
    print("Tapped the notification!")
}))

UINotificationCenter.current.show(notification: notification, dismissTrigger: UINotificationDurationDismissTrigger(duration: 2.0))
```

### Create a custom style
```swift
import UINotifications

enum CustomNotificationStyle: UINotificationStyle {
    case success
    case failure
    
    var font: UIFont {
        switch self {
        case .success:
            return UIFont.systemFont(ofSize: 15, weight: UIFontWeightSemibold)
        case .failure:
            return UIFont.systemFont(ofSize: 13, weight: UIFontWeightRegular)
        }
        
    }
    var backgroundColor: UIColor {
        switch self {
        case .success:
            return UIColor.green
        case .failure:
            return UIColor.red
        }
        
    }
    var textColor: UIColor {
        return UIColor.white
    }<commit_msg>Readme fix<commit_after><p align="center">
    <img width="900px" src="banner.png">
</p>

<p align="center">
<img src="http://img.shields.io/travis/<NAME>/UINotifications.svg?style=flat"/>
<img src="https://img.shields.io/cocoapods/v/UINotifications.svg?style=flat"/>
<img src="https://img.shields.io/cocoapods/l/UINotifications.svg?style=flat"/>
<img src="https://img.shields.io/cocoapods/p/UINotifications.svg?style=flat"/>
<img src="https://img.shields.io/badge/License-MIT-yellow.svg?style=flat"/>
</p>

- [Features](#features)
- [Example](#example)
- [Requirements](#requirements)
- [Usage](#usage)
    - [Making a Notification](#making-a-notification)
    - [Create a custom style](#create-a-custom-style)
    - [Use a custom dismiss trigger](#use-a-custom-dismiss-trigger)
    - [Create a custom UINotificationView](#create-a-custom-uinotificationview)
    - [Create a custom presenter](#create-a-custom-presenter)
- [Communication](#communication)
- [Installation](#installation)
- [License](#license)

## Features
- [x] Present your own custom view easily as an in-app Notification
- [x] Create custom presentation styles
- [x] Update content during presentation

## Example

To run the example project, clone the repo, and open `UINotifications-Example.xcodeproj` from the Example directory.

![Albums list](Assets/succes_notification.png?raw=true)
![Camera Roll](Assets/failure_notification.png?raw=true)

## Requirements
- Swift 3.0, 3.1, 3.2
- iOS 8.0+
- Xcode 8.1, 8.2, 8.3

## Usage

### Making a Notification

```swift
import UINotifications

let content = UINotificationContent(title: "My Custom Text", chevronImage: UIImage(named: "MyChevron"))
let notification = UINotification(content: content, action: UINotificationCallbackAction(callback: {
    print("Tapped the notification!")
}))

let dismissTrigger = UINotificationDurationDismissTrigger(duration: 2.0)
UINotificationCenter.current.show(notification: notification, dismissTrigger: dismissTrigger)
```

### Create a custom style
```swift
import UINotifications

enum CustomNotificationStyle: UINotificationStyle {
    case success
    case failure
    
    var font: UIFont {
        switch self {
        case .success:
            return UIFont.systemFont(ofSize: 15, weight: UIFontWeightSemibold)
        case .failure:
            return UIFont.systemFont(ofSize: 13, weight: UIFontWeightRegular)
        }
        
    }
    var backgroundColor: UIColor {
        switch self {
        case .success:
            return UIColor.green
        case .failure:
            return UIColor.red
        }
        
    }
    var textColor: UIColor {
        return UIColor.white
    }
{'fraction_non_alphanumeric': 0.13425487597046015, 'fraction_numerical': 0.008710471501609543, 'mean_word_length': 3.8193430656934306, 'pattern_counts': {'":': 0, '<': 25, '<?xml version=': 0, '>': 25, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3240506', 'n_tokens_mistral': 1759, 'n_tokens_neox': 1663, 'n_words': 364}