MPresentr
图像
安装
pod init
pod 'MPresentr'
pod install
用法
import MPresentr
let alert = MPresentrAlert()
let addFriendAction = MPresentrAction(title: "Add Friend", alertType: .default, blockToRun: {})
let blockAction = MPresentrAction(title: "Block", alertType: .destructive){
self.alert.dismiss(animated: true)
}
alert.addActions(addFriendAction,blockAction)
present(alert, animated: true)