Latest 1.1.0
Homepage https://github.com/moritzdietsche/mdnotificationview
License MIT
Platforms ios 9.0
Frameworks UIKit

CI Status
codecov
codebeat badge
Version
License
Platform
Carthage compatible

MDNotificationView provides a customizable view that slide in from the top or the bottom. Use MDNotificationViews for in-app notifications (e. g. in a chat app) or to provide feedback to your app’s users (e. g. "Settings changed" and an undo button next to it). MDNotificationViews behave mostly like Material Design Snackbars but are fully customizable. This means you can select from a few predefined layouts or implement your own UIView. The MDNotificationView propagates livecycle and tap events to its delegate, telling your app when it has been shown, hidden or tapped. And of course, it will adjust to the status bar size and to rotation.

Screenshots

ExpandedImageLayoutView

The MDNotificationExpandedImageLayoutView contains an image, a title and a text. Register your view controller as a MDNotificationViewDelegate to be notified if the user taps the view.

CompactLayoutView

The MDNotificationCompactLayoutView contains a text of up to two lines. Like all layouts, its background and text properties can be customized.

CompactButtonLayoutView

The MDNotificationCompactButtonLayoutView contains a button and a text. Add a gesture recognizer to the UIButton to trigger custom actions.

Custom UIView

Pass a custom UIView to the MDNotificationView for more flexibility. Register your view controller as a MDNotificationViewDelegate to be notified when the view has been shown or hidden. E. g. hide the notification view after the download finishes.

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

  • iOS 9.0+
  • Swift 4.1+

Refer to Version 1.0 for Swift 3.3 compatibility.

Installation

MDNotificationView is available through CocoaPods. To install it, add the following line to your Podfile:

pod "MDNotificationView"

MDNotificationView is also available through Carthage. To install it, add the following line to your Cartfile:

github "moritzdietsche/MDNotificationView"

Questions & Issues

  • Use Stack Overflow if you have any questions. I watch the tag mdnotificationview.
  • Open an issue if you found a bug or have a feature request.
  • Submit a pull request if you want to contribute. Contributions are welcome!

Author

Moritz Dietsche

License

MDNotificationView is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "MDNotificationView",
    "version": "1.1.0",
    "summary": "Notification views for iOS apps.",
    "swift_version": "4.1",
    "description": "MDNotificationView provides a customizable view that slide in from the top or the bottom. Use MDNotificationViews for in-app notifications (e. g. in a chat app) or to provide feedback to your app's users (e. g. "Settings changes" and an undo button next to it). MDNotificationViews behave mostly like Material Design Snackbars but are fully customizable. This means you can select from a few predefined layouts or implement your own UIView. The MDNotificationView propagates livecycle and tap events to its delegate, telling your app when it has been shown, hidden or tapped. And of course, it will adjust to the status bar size and to rotation.",
    "homepage": "https://github.com/moritzdietsche/mdnotificationview",
    "screenshots": [
        "https://github.com/moritzdietsche/mdnotificationview/blob/master/Documentation/ExpandedImageLayoutView.png?raw=true",
        "https://github.com/moritzdietsche/mdnotificationview/blob/master/Documentation/CompactLayoutView.png?raw=true",
        "https://github.com/moritzdietsche/mdnotificationview/blob/master/Documentation/CompactButtonLayoutView.png?raw=true",
        "https://github.com/moritzdietsche/mdnotificationview/blob/master/Documentation/Custom%20UIView.png?raw=true"
    ],
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": "Moritz Dietsche",
    "source": {
        "git": "https://github.com/moritzdietsche/mdnotificationview.git",
        "tag": "1.1.0"
    },
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "MDNotificationView/Sources/**/*",
    "resource_bundles": {
        "MDNotificationView": [
            "MDNotificationView/Assets/*"
        ]
    },
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This