PullableSheet
类似于默认地图应用或底部菜单(Android)的滑出面板。
安装
Carthage
github "tattn/PullableSheet"
CocoaPods
pod 'PullableSheet'
用法
import PullableSheet
// ....
override func viewDidLoad() {
super.viewDidLoad()
let content = UIViewController() // your view controller
content.view.backgroundColor = .clear
let sheet = PullableSheet(content: content)
sheet.snapPoints = [.min, .custom(y: 300), .max] // snap points (if needed)
sheet.add(to: self)
}
自定义顶部栏
let topBar = UIView(frame: .init(x: 0, y: 5, width: 300, height: 30))
topBar.backgroundColor = .green
let sheet = PullableSheet(content: content, topBarStyle: .custom(topBar))
贡献
- 将其分叉!
- 创建你的功能分支:
git checkout -b my-new-feature
- 提交你的更改:
git commit -am '增加一些功能'
- 推送到分支:
git push origin my-new-feature
- 提交合并请求 :D
许可协议
PullableSheet 以 MIT 许可协议发布。详情请参阅 LICENSE。