作者:乘浪追风2010_210 | 来源:互联网 | 2023-09-12 13:37
Hi,
I can't use showCloseButton in SCLAlertView.SCLAppearance.
let appearance = SCLAlertView.SCLAppearance(
kTitleFont: ACFont.fontMediumWithSize(16),
kTextFont: ACFont.fontRegularWithSize(14),
kButtonFont: ACFont.fontRegularWithSize(15),
contentViewColor: UIColor.white,
showCloseButton: false
)
It says "Cannot invoke value" etc...
?
该提问来源于开源项目:vikmeup/SCLAlertView-Swift
func showInfoMessage(info: String, subTitle: String, closeTitle: String,duration: TimeInterval) {
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
| let appearance = SCLAlertView.SCLAppearance(
showCloseButton: false
)
let alert = SCLAlertView(appearance: appearance)
alert.addButton("拨打电话") {
let telStr = CCUserAccountModel.sharedInstance.account!.serverMobile
UIApplication.shared.openURL(URL(string: "telprompt://\(telStr ?? "")")!)
}
alert.addButton("人工查询", target: self, selector: #selector(personHelp))
alert.addButton("关闭", backgroundColor: UIColor(hexColor: "c7c7c7"), textColor: UIColor(hexColor: "717171"), showDurationStatus: true) {
}
alert.showInfo(info, subTitle: subTitle, duration: duration, colorStyle: 0x1f6aa7, animationStyle: .noAnimation)
} |
this is optional,don’t need to unwrap those strings