摘要: //// DelayRun.swift// // Created by XuQing on 16/7/1.// Copyright © 2016年 xuqing. All rights reserved.//import Foundationtypealias Task = (cancel : Bool) -> ()func DelayRun(time:NSTimeInterval, ta... 阅读全文
posted @ 2016-07-22 11:31 yesicoo 阅读(1396) 评论(0) 推荐(0) 编辑
摘要: UIView.transitionWithView( self.WeatherDetailsView, duration: 0.7, options: .TransitionCrossDissolve, animations: { self.WeatherDetailsView.alpha = 0.75; self.WeatherV... 阅读全文
posted @ 2016-07-22 10:52 yesicoo 阅读(304) 评论(0) 推荐(0) 编辑
摘要: sudo find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist -maxdepth 3 | xargs -I{} defaults write {} DVTPlugInCompatibilityUUIDs -array-add `defaults read /Application... 阅读全文
posted @ 2016-03-22 17:16 yesicoo 阅读(390) 评论(0) 推荐(0) 编辑
摘要: 在存在遮挡的ViewController的ViewDidload函数里添加以下两句即可解决 self.edgesForExtendedLayout = UIRectEdge.None self.automaticallyAdjustsScrollViewInsets = false 抄的,具体什么情 阅读全文
posted @ 2016-03-04 16:29 yesicoo 阅读(423) 评论(0) 推荐(0) 编辑
摘要: 做的是二维码扫描,扫描后识别为URL的话就跳转到webview 加载网页,用的是代理传值的方式。扫描到了 值传递到主页 扫描窗体退出,检测值是否是http://开头 是网页就跳转。 问题出在传值到主界面后判断网页链接再跳转的时候 出现Attempt to present on whose view 阅读全文
posted @ 2016-02-23 16:32 yesicoo 阅读(1230) 评论(0) 推荐(0) 编辑
摘要: func isTelNumber(num:NSString)->Bool { var mobile = "^1(3[0-9]|5[0-35-9]|8[025-9])\\d{8}$" var CM = "^1(34[0-8]|(3[5-9]|5[017-9]|8[278])\\d)\\d{7}$" v 阅读全文
posted @ 2016-02-23 15:31 yesicoo 阅读(1003) 评论(0) 推荐(0) 编辑
摘要: 一,新建一个协议(Protocol) VisitURLProtocol.swift import UIKit protocol VisitURLProtocol{ func didVisitURL(url:String); } 二,在使用的地方采用对象调用 TableView.swift var v 阅读全文
posted @ 2016-02-19 14:10 yesicoo 阅读(949) 评论(0) 推荐(0) 编辑
摘要: 1.跳转到任一UIViewController var sb = UIStoryboard(name: "Main", bundle:nil) var vc = sb.instantiateViewControllerWithIdentifier("ChooseViewController") as 阅读全文
posted @ 2016-02-19 11:43 yesicoo 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 在写结婚请帖的时候刚开始开发准备是依靠微信和QQ进行传播的 html嵌入了audio标签的BGM设置自动播放 一切正常。在实际传播中发现通过ios和android平台自带的浏览器访问请帖的链接均无法自动播放音乐,网上搜索下发现是(据说是)为了节省移动端流量就不会自动播放媒体文件,必须事件触发。触发事 阅读全文
posted @ 2016-02-01 17:10 yesicoo 阅读(335) 评论(0) 推荐(0) 编辑
摘要: 需求:在某个列表页面跳转到增加新项目页面后需要返回到前一个页面 并且数据最新数据。刚开始是做法是 history.back();方法 返回后页面不会自动刷新的。在新的页面重新访问之前页面的链接可以访问到新加载了新数据的页面,但这样子也会导致页面加载过多占内存。 这个时候可以用sessionStora 阅读全文
posted @ 2016-02-01 16:55 yesicoo 阅读(2908) 评论(0) 推荐(0) 编辑