要运行示例项目,首先克隆仓库,然后从 Example 目录运行 pod install
。
var rateUsInfo = MBRateUsInfo() //get the default settings
//override any attribute
rateUsInfo.title = "Enjoying The League?"
rateUsInfo.titleImage = UIImage(named: "icon")
rateUsInfo.itunesId = "893653132"
//set the value in the shared instance
MBRateUs.sharedInstance.rateUsInfo = rateUsInfo
MBRateUs.sharedInstance.showRateUs(self
, positiveBlock: { () -> Void in
//code to run when the user chose more than 3 stars and chose to rate in the app store
}, negativeBlock: { () -> Void in
//code to run when the user chose less than 4 stars and chose to send feedback
}) { () -> Void in
//code to run when the user dismissed that screen without choosing anything
}
MBRateApp 通过 CocoaPods 提供。要安装它,只需将以下行添加到您的 Podfile 中
pod "MBRateApp"
Mati Bot,[email protected],@b0tnik
MBRateApp 在 MIT 许可证下可用。查看 LICENSE 文件以获取更多信息。