JNBTopbar
Requirements
iOS 11+
Installation
JNBTopbar is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'JNBTopbar'
Example
Here's how one may show a greeting label for two and a half seconds.
JNBTopbar.shared.showWith(contentView: label,
contentBackgroundColor: UIColor.black,
cornerRadius: 6,
screenInsets: UIEdgeInsets(top: 0, left: -8, bottom: -16, right: -8),
shadowColor: UIColor.black.cgColor,
shadowOpacity: 0.7,
shadowRadius: 10,
borderWidth: 2.0,
borderColor: UIColor.white.cgColor,
forDuration: 2.5,
completion: nil)
If you do not specify a forDuration; the bar will show until hide or another call to show is made.
JNBTopbar.shared.hide { (completed) in
guard completed else { return }
// bar has finished animating uup
}
License
MIT license. See the LICENSE file for more info.