JNBBottombar
需求
iOS 11+
安装
JNBBottombar可通过CocoaPods获取。要安装它,只需将以下行添加到您的Podfile中:
pod 'JNBBottombar'
示例
以下是如何显示持续两秒的问候标签的方法。
JNBBottombar.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)
如果没有指定forDuration,则栏将显示到隐藏或另一个调用show时为止。
JNBBottombar.shared.hide { (completed) in
guard completed else { return }
// bar has finished animating down
}
许可证
MIT许可证。更多信息请参阅LICENSE文件。