状态栏设置颜色没用: [[UINavigationBar appearance] setBackgroundImage:[[UIImage alloc] init] forBarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault]; [[ ...
分类:
移动开发 时间:
2016-09-26 13:14:07
阅读次数:
188
有时候我们需要处理图片,比如改变大小,旋转,截取等等,所以今天说一说图片处理相关的一些操作。本文所说的方法都是写在UIImage的Category中,这样使用起来也方便;由于代码太多,这里就不贴具体实现代码了,大家可以去我的Github查看demo,效果如下: 颜色相关 1.根据颜色生成纯色图片就是 ...
分类:
其他好文 时间:
2016-09-26 12:37:22
阅读次数:
204
cell重用时,图片更换 1.在模型中定义一个图片属性 @property (nonatomic,copy) UIImage *image; 2.判断模型中是否已经存在图片 如果有图片 就给当前 模型对象图片赋值 3.如果没有图片就先显示占位图片 然后异步下载图片 4.将下载完的图片保存在模型里面 ...
分类:
其他好文 时间:
2016-09-25 10:37:23
阅读次数:
118
有时候我们需要处理图片,比如改变大小,旋转,截取等等,所以今天说一说图片处理相关的一些操作。本文所说的方法都是写在UIImage的Category中,这样使用起来也方便;由于代码太多,这里就不贴具体实现代码了,大家可以去我的Github查看demo,效果如下: 颜色相关 1.根据颜色生成纯色图片就是 ...
分类:
其他好文 时间:
2016-09-22 13:06:21
阅读次数:
227
+ (UIImage *)fixOrientation:(UIImage *)aImage { // No-op if the orientation is already correct if (aImage.imageOrientation == UIImageOrientationUp) re ...
分类:
其他好文 时间:
2016-09-21 19:56:05
阅读次数:
126
UILabel* label = [[UILabel alloc] init]; label.frame = CGRectMake(0, 100, 200, 100); label.textColor = [UIColor blackColor]; NSMutableAttributedString ...
分类:
其他好文 时间:
2016-09-20 16:26:25
阅读次数:
125
tip 1 : 给UIImage添加毛玻璃效果 func blurImage(value:NSNumber) -> UIImage { let context = CIContext(options:[KCIContextUseSoftwareRenderer:true]) let ciImage ...
分类:
移动开发 时间:
2016-09-19 11:25:08
阅读次数:
364
UITextField *textF = [[UITextField alloc]initWithFrame:CGRectMake(0, kFitH(100), kScreenWidth, kFitH(60))]; textF.backgroundColor = [UIColor whiteColo ...
分类:
其他好文 时间:
2016-09-19 08:56:37
阅读次数:
208
新建一个Category,命名为UIColor+Hex,表示UIColor支持十六进制Hex颜色设置。 UIColor+Hex.h文件, #import <UIKit/UIKit.h> #define RGBA_COLOR(R, G, B, A) [UIColor colorWithRed:((R) ...
分类:
移动开发 时间:
2016-09-13 16:32:12
阅读次数:
210