Swift3 使用系统UIAlertView方法做吐司效果
2017-02-13 11:34
323 查看
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #000000 }
p.p2 { margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #cf8724 }
p.p3 { margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #000000; min-height: 16.0px }
p.p4 { margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #c35900 }
span.s1 { }
span.s2 { color: #cf8724 }
span.s3 { font: 14.0px "PingFang SC" }
span.s4 { color: #36568a }
span.s5 { color: #c35900 }
span.s6 { color: #587ea8 }
span.s7 { color: #000000 }
p.p2 { margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #cf8724 }
p.p3 { margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #000000; min-height: 16.0px }
p.p4 { margin: 0.0px 0.0px 0.0px 0.0px; font: 14.0px Menlo; color: #c35900 }
span.s1 { }
span.s2 { color: #cf8724 }
span.s3 { font: 14.0px "PingFang SC" }
span.s4 { color: #36568a }
span.s5 { color: #c35900 }
span.s6 { color: #587ea8 }
span.s7 { color: #000000 }
/** *显示弹出信息 */ class func showAlertMessage(_ str:String,showtime Num:Double){ let alert = UIAlertView(title: str, message: nil, delegate: nil, cancelButtonTitle: nil); alert.show() // self.performSelector(#selector(dismissAlert(_:)), withObject: alert, afterDelay: Num) let dispatchTime: DispatchTime = DispatchTime.now() + Double(Int64(0.10 * Num * Double(NSEC_PER_SEC))) / Double(NSEC_PER_SEC) DispatchQueue.main.asyncAfter(deadline: dispatchTime, execute: { dismissAlert(alert) }) } class func dismissAlert(_ alert:UIAlertView){ alert.dismiss(withClickedButtonIndex: alert.cancelButtonIndex, animated: true) }
相关文章推荐
- [iPhone开发之控件的使用]UIAlertView的各种属性、方法及代理的使用
- UIAlertView的使用方法
- UIAlertView的使用方法
- iOS系统UIPickerView的简单使用和方法属性介绍
- UIAlertView的基本使用和对话框中按钮的事件处理方法
- iPhone UIAlertView属性及使用方法
- UIAlertView的各种属性、方法及代理的使用
- UIAlertView的使用方法
- UIAlertView的各种属性、方法及代理的使用
- IOS--UIAlertView的使用方法详细
- iPhone UIAlertView属性及使用方法
- IOS学习笔记(九)之UIAlertView(警告视图)和UIActionSheet(操作表视图)基本概念和使用方法
- iPhone开发UIAlertView属性及使用方法
- UIAlertView的各种属性、方法及代理的使用
- UIAlertView 的基本使用方法
- UIAlertView的使用方法
- 使用storyboard显示UITableView时,如果不修改系统默认生成的tableView:cellForRowAtIndexPath:方法中的代码,则必须为UITableViewCell注册(填写)重用标识符:identifier.必须要代码方法中的标识符一致.
- IOS学习笔记(九)之UIAlertView(警告视图)和UIActionSheet(操作表视图)基本概念和使用方法
- Android使用WebView加载网页屏蔽系统浏览器的方法
- iOS中UIAlertView的使用方法