摘要: 背景:一个月没碰这个App项目,进入项目路径后无脑pull远端仓库,导致本地文件冲突,虽然reset到之前的commit节点,但还是导致了以下意料之外的问题。 查询结果:-L -> Library , -F -> Framework, 错误提示: ld: warning: directory not 阅读全文
posted @ 2017-03-07 09:53 madarax 阅读(633) 评论(0) 推荐(0) 编辑
摘要: class func clearCache(finshed : (() -> Void)){ let cachePath = NSSearchPathForDirectoriesInDomains(NSSearchPathDirectory.CachesDirectory, NSSearchPath 阅读全文
posted @ 2016-12-20 17:47 madarax 阅读(1909) 评论(0) 推荐(0) 编辑
摘要: func screenShot(targetView : UIView) -> UIImage{ UIGraphicsBeginImageContextWithOptions(targetView.bounds.size, false, 0) targetView.drawViewHierarchy 阅读全文
posted @ 2016-12-13 16:42 madarax 阅读(109) 评论(0) 推荐(0) 编辑
摘要: /* 设置虚线 */ let borderLabayer = CAShapeLayer() borderLabayer.bounds = CGRect(x: 0, y: 0, width: addField.width(), height: addField.height()) borderLaba 阅读全文
posted @ 2016-12-13 16:16 madarax 阅读(863) 评论(0) 推荐(0) 编辑
摘要: 谈到单例,我们要想到几点:为什么使用单例,单例实现原理是什么,使用过程中有哪些问题是需要注意的? 单例作为一种设计模式,也更是一种解决方案。 >>>>>>>为什么使用单例: 1、资源共享的情况下,避免资源操作时导致的性能或损耗。 2、控制自已的情况下,方便资源之间的互相通信。 >>>>>>>单例的规 阅读全文
posted @ 2016-11-25 14:14 madarax 阅读(223) 评论(0) 推荐(0) 编辑
摘要: // 加密 转换为字符串 func sign(dict:Dictionary<String,String>?,_ sign:String) -> String { let sortDict = dict?.sort{ $0.0 < $1.0 } var params = "" for (key,va 阅读全文
posted @ 2016-08-15 17:30 madarax 阅读(111) 评论(0) 推荐(0) 编辑
摘要: // 自定义各个顶角的圆角 /// 头像 iconView = UIImageView() iconView.frame.size = CGSizeMake(Consts.WIDTH - 10, 170 * Consts.RATE) contentView.addSubview(iconView) 阅读全文
posted @ 2016-05-09 17:06 madarax 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 随手笔记,欢迎指教 阅读全文
posted @ 2016-05-09 16:55 madarax 阅读(443) 评论(0) 推荐(0) 编辑