摘要: imageNamed:是UIImage的一个类方法,它在加载图像资源的流程中:a. 先去检测缓存中是否存在该图像,如果存在则直接返回。b. 如果缓存中不存在该图像,则会先加载到缓存中然后返回对象。所以这种流程造成了图片资源使用完成后不能即刻释放内存,如果图片资源过大会造成内存被大量占用而得不到释放。... 阅读全文
posted @ 2015-02-05 16:45 沧海没有水 阅读(195) 评论(0) 推荐(0) 编辑
摘要: #mapKit使用最基本的例子#终点在于注意在iOS8中定位增加的授权请求1.在创建CLLocationManager后,需要进行定位授权。-(CLLocationManager *)mgr{ if (_mgr == nil) { _mgr = [[CLLocat... 阅读全文
posted @ 2015-01-15 22:38 沧海没有水 阅读(139) 评论(0) 推荐(0) 编辑
摘要: #ViewController.m#import "ViewController.h"@interface ViewController ()/** * storybord连线 */@property (weak, nonatomic) IBOutlet UIImageView *imageVie... 阅读全文
posted @ 2015-01-15 22:16 沧海没有水 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 练习的时候做过的一个demo,附上github地址:https://github.com/H0ng/GestureLock#HHView.h#import @class HHView;@protocol HHViewDelegate @optional-(void)showView:(HHView*... 阅读全文
posted @ 2015-01-15 21:54 沧海没有水 阅读(254) 评论(0) 推荐(0) 编辑
摘要: /** * imageWithBackgroundImage:: * * @param backgroundImage 背景图片名 * @param logoImage 水印图片名 * * @return 加上水印后的图片 */+ (instancetype)imageWithB... 阅读全文
posted @ 2015-01-15 20:45 沧海没有水 阅读(220) 评论(0) 推荐(0) 编辑
摘要: /** * 方法captureWithView: * * @param view 传入要截图的view * * @return 返回截取的图片 */+ (instancetype)captureWithView:(UIView *)view{ UIGraphicsBeginImageCo... 阅读全文
posted @ 2014-12-21 22:40 沧海没有水 阅读(192) 评论(0) 推荐(0) 编辑