2015年12月14日

天气预报

摘要: Json在线解析工具: http://www.jsoneditoronline.org/实时天气API: http://www.k780.com/api/weather.today①绘制简单的UI,三个label,分别显示城市、天气、温度②在Class外面创建Weather结构体 structWea... 阅读全文

posted @ 2015-12-14 21:36 罗小夕 阅读(173) 评论(0) 推荐(0) 编辑

App Transport Security has blocked a cleartext HTTP (http://) resource load since it is insecure.

摘要: 解决方法: 方法1.使用https协议请求; 方法2.Info.plist中增加App Transport Security Settings子项Allow Arbitrary Loads设置为YES。 阅读全文

posted @ 2015-12-14 20:53 罗小夕 阅读(699) 评论(0) 推荐(0) 编辑

jSON Call can throw but it is not marked with try

摘要: let jsonData:NSDictionary = NSJSONSerialization.JSONObjectWithData(urlData!, options:NSJSONReadingOptions.MutableContainers ) as! NSDictionary第一种用法:do... 阅读全文

posted @ 2015-12-14 20:38 罗小夕 阅读(196) 评论(0) 推荐(0) 编辑

银行卡扫描(基于swift)

摘要: ①下载CardIO库②将库文件解压,拖入工程,务必按下图勾选③选中项目,target-->build Setting-->All Other Linker Flags 双击“+”,添加语句“-lc++”④General,找到Linked Frameworks and libtaries 添加... 阅读全文

posted @ 2015-12-14 11:27 罗小夕 阅读(652) 评论(0) 推荐(0) 编辑

导航