摘要: 单例模式算是开发中比较常见的一种模式了。在iOS中,单例有两种实现方式(至少我目前只发现两种)。根据线程安全的实现来区分,一种是使用@synchronized,另一种是使用GCD的dispatch_once函数。1.@synchronized 实现static InstanceClass *inst... 阅读全文
posted @ 2015-05-29 15:44 android 勤奋 阅读(386) 评论(0) 推荐(0)
摘要: //// UIImage+CX.h// 03-图片水印////#import @interface UIImage (CX)/** * 打水印 * * @param bg 背景图片 * @param logo 右下角的水印图片 */+ (instancetype)waterImageW... 阅读全文
posted @ 2015-05-25 22:13 android 勤奋 阅读(118) 评论(0) 推荐(0)
只有注册用户登录后才能阅读该文。 阅读全文
posted @ 2015-05-22 14:52 android 勤奋 阅读(3) 评论(0) 推荐(0)