MMActionSheet
Github: MMActionSheet
IntroductionMMActionSheet 是一个简单的弹出选择框,开题报告,使用纯swift编写,论文,类似于微信的actionsheet
RquirementsiOS 8.0+
Xcode 9 (swift 4)
current code keep on swift4
Xcode 8 (swift 3)
If you want to run demo in swift3, please switch branch to swift3.0
Installation① Cocoapodspod 'MMActionSheet', '~> 0.0.5'
import MMActionSheet in you code
② Copy code into project克隆代码,然后将components文件夹下面的两个文件 MMActionSheet.swift 和 MMButton.swift加入到你的项目中即可。
Usagelet buttons = [ [ 'title': '拍照', 'handler': 'camera', ],[ 'title': '相册', 'handler': 'photos', 'type': 'default' ] ] let mmActionSheet = MMActionSheet.init(title: '请选择照片', buttons: buttons, duration: nil, cancel: true) mmActionSheet.callBack = { (handler) ->() in print(handler) } mmActionSheet.present() ContactsGithub: MinMao-Hub
Email: 1286090267@qq.com
喜欢的朋友请给个星星哦【star】