SystemNotification is a SwiftUI
library that lets you mimic the native iOS system notification that for instance is presented when toggling silent mode on and off on your iPhone.
The result can look like this, or completely different:
These notifications have a default style, but can be customized to great extent to fit your specific needs.
SystemNotification supports iOS v14
, macOS v11
, tvOS v14
and watchOS v7
.
SystemNotification can be installed with the Swift Package Manager:
https://github.com/danielsaidi/SystemNotification.git
or with CocoaPods
pod SystemNotification
To get started with SystemNotification, have a look at this getting started guide.
The online documentation contains more information, code examples etc. and makes it easy to overview the various parts of the library.
The online documentation is currently iOS only. To generate documentation for other platforms, open the package in Xcode, select a simulator then run Product/Build Documentation
.
This project contains a demo app that lets you explore SystemNotification on iOS. To run it, just open and run Demo/Demo.xcodeproj
.
You can sponsor this project on GitHub Sponsors or get in touch for paid support.
Feel free to reach out if you have questions or if you want to contribute in any way:
SystemNotification is available under the MIT license. See the LICENSE file for more info.
link |
Stars: 135 |
Last commit: 2 weeks ago |
This release greatly improves how notifications are presented and dismissed and simplifies usage.
The demo app now uses a local package, which makes it a lot easier to develop the library.
SystemNotification has a brand new DocC documentation.
Due to the new documentation, the package now requires Swift 5.5.
SystemNotificationContext
has a new completion-based dismiss function.SystemNotificationMessageConfiguration
has new iconTextSpacing
and titleTextSpacing
properties.SystemNotificationUIKitOverlay
is a new view that simplifies adding a system notification to a UIKit view.View+SystemNotification
has a new parameter-based extension that replaces the old notification-based one.SystemNotificationMessageConfiguration
is adjusted to make a message look more like an iPhone system notification.systemNotification(:)
function is deprecated.SystemNotification+Message
has been deprecated.SystemNotificationConfiguration
minWidth
is no longer used and has been removed.View+SystemNotification
has deprecated the SystemNotification
-based extension.Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics