- 博客(5)
- 收藏
- 关注
原创 Swift3.0 MBProgressHUD的封装使用
创建 UIViewController+HUD.swiftimport Foundationimport MBProgressHUD// keyWindowlet KeyWindow : UIWindow = UIApplication.shared.keyWindow!private var HUDKey = "HUDKey"extension UIViewController{
2016-12-30 11:45:58 4666
原创 Swift3.0 Any数据类型转Json
func toolsChangeToJson(info: Any) -> String{ //首先判断能不能转换 guard JSONSerialization.isValidJSONObject(info) else { PrintLog(“json转换失败”) return “” } //如果设置options为JSON
2016-12-29 18:54:49 5265 2
原创 Swift3.0 Date日期的使用
//获得当前时间,但是时间是格林威治时间let currentDate = Date()print("当前时间:\(currentDate)")//当前时间:2016-12-07 10:00:58 +0000//设置时间显示样式let dateFormatter = DateFormatter() dateFormatter.locale = Locale.current //设置时区,
2016-12-07 18:02:34 5330
原创 Swift3.0 颜色渐变
let button = UIButton(frame: CGRect(x: 0, y: 100, width: SCREEN_WIDTH, height: 150)) button.backgroundColor = UIColor.clear button.addTarget(self, action: #selector(buttonAction), for:
2016-12-06 13:34:21 2285
原创 Swift 3.0 拨打电话
//1.有提示 let callWebView = UIWebView() callWebView.loadRequest(URLRequest(url:URL(string: "tel:\(10086)")!)) self.addSubview(callWebView)//2.有提示 UIApplication.shared.openURL(URL(string: "telprompt:
2016-12-05 09:25:36 5163
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人