Bauletto
Display iOS 13 style banner with ease.
Preview
Features
- Highly customizable ✅
- iPhone, iPhone X, & iPad Support ✅
- Orientation change support ✅
- Haptic feeback support ✅
Requirements
- iOS 10.0+
- Xcode 10.0+
Installation
Carthage
In order to use Bauletto via Carthage simply add this line to your Cartfile
:
Swift 5
Then add Bauletto.framework
in your project.
Swift Package Manager
The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the swift
compiler.
Once you have your Swift package set up, adding Bauletto as a dependency is as easy as adding it to the dependencies
value of your Package.swift
.
Usage
Creating a Bauletto is simple as this:
If you want to change the tint color of the Bauletto, just use the tintColor
value in the BaulettoSettings declaration as follows:
To change the background blur effect, add the backgroundStyle
:
You can even change the dismissMode, which can be .never
, automatic
or .custom(seconds: 2)
. By default it uses the automatic.
You can also change the duration of the show animation. By default it uses 1.0 second.
Bauletto has a personal queue for the banners that will show up. When you show a banner you can select where in the queue it will be put. By default it is .end
.
When you want to show up a new message immediately, add it by using the show()
function, and then use:
Do you have a bunch of settings in the queue and you want to remove them? No problem.
Bauletto can also have an action for a tap gesture. If you pass the action
parameter, it will call the closure once the user tapped the banner.
Haptic Feedback Support
You can also set a haptic feedback when the Bauletto shows up. By default, no haptic feedback will be generated. The types of haptic feedback are as follows:
To change the style of haptic feedback, simply declare it in the BaulettoSettings initialization:
Feature Requests
I'd love to know improve Bauletto as much as I can. Feel free to open an issue and I'll do everything I can to accomodate that request if it is in the library's best interest. Or just create a pull request and I'll check it out.
Author
Gianpiero Spinelli, gianpiero@grspinelli.it