ZBottomSheet
示例
要运行示例项目,先从仓库克隆,然后从 Example 目录运行 pod install
要求
安装
ZBottomSheet 可通过 CocoaPods 获得。要安装它,只需将以下行添加到 Podfile 中
pod 'ZBottomSheet'
作者
sxudan,[email protected]
许可证
ZBottomSheet 可在 MIT 许可证下使用。有关更多信息,请参阅 LICENSE 文件。
演示
类型:控制器
类型:视图
使用方法
控制器
let controller = ZBottomSheet.Controller(parent: self)
controller.showSheet()
视图
let sheetView = ZBottomSheet.View(parent: self)
sheetView.addNavigationBar() { navigationBar in
return 70 // 栏的高度
}
sheetView.showSheet()
属性
var isClosable: Bool { get set }
var enableClipToBar: Bool { get set }
var initialHeight: CGFloat { get set }
var isExpandableToFullHeight: Bool! { get set }
func addNavigationBar(_ navigationBarHandler: @escaping (UINavigationBar) -> CGFloat)
func addTableView(_ tableViewHandler: @escaping (UITableView, UIScrollView) -> Void)
func addCollectionView(flowLayout: UICollectionViewFlowLayout?,_ collectionViewHandler: @escaping (UICollectionView, UIScrollView) -> Void)
func addBottomSheetView(view: UIView, presentedView viewHandler: @escaping (UIView) -> Void)
func addScrollView(_ scrollViewHandler: @escaping (UIScrollView) -> Void)
func addContentView(_ contentViewHandler: @escaping (UIView) -> Void)
var state: State! { get set }