iOS中的图片自适应拉伸

iOS中的图片自适应拉伸

iOS5之前

- (UIImage *)stretchableImageWithLeftCapWidth:(NSInteger)leftCapWidth topCapHeight:(NSInteger)topCapHeight;  

iOS5

- (UIImage *)resizableImageWithCapInsets:(UIEdgeInsets)capInsets;

iOS6

- (UIImage *)resizableImageWithCapInsets:(UIEdgeInsets)capInsets resizingMode:(UIImageResizingMode)resizingMode;s

上一篇
Weakself 与 Strongself的兄弟情 Weakself 与 Strongself的兄弟情
Weakself 与 Strongself1、什么时候用weakself? 主要看block是否被self持有,并且有没有产生循环引用 ,倘若都没有就不需要用weakself 2、什么时候用strongself? 主要是防止block执行过
2018-10-16
下一篇
iOS调试技巧大全 iOS调试技巧大全
NSLog//保证 ifdef 中的宏定义只会在 OC 代码中被引用; //否则一旦引入 C 或者 C++ 代码或者框架就会出错! #ifdef __OBJC__ //只在开发中用: #ifdef DEBUG //定义 NSLog(_
2018-09-14
目录