// 加入现在有三张图片分别为animate_1、animate_2、animate_3 // 方法一 imageView.animationImages =@[[UIImage imageNamed:@"animate_1"], [UIImage imageNamed:@"animate_2"], ...
分类:
移动开发 时间:
2020-06-16 14:58:17
阅读次数:
98
UIViewController 的 生命周期 #pragma mark life circle // 非storyBoard(xib或非xib)都走这个方法 - (instancetype)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBun ...
分类:
其他好文 时间:
2020-06-15 12:12:01
阅读次数:
64
1. -(void)saveImage:(CGImageRef)image directoryURL:(NSURL*)directoryURL filename:(NSString*)filename { @autoreleasepool { NSURL *fileURL = [directoryU ...
分类:
其他好文 时间:
2020-04-10 10:29:59
阅读次数:
81
- 根据RGB组合创建颜色,alpha传0.5表示半透明 + (UIColor *)colorWithRed:(CGFloat)red green:(CGFloat)green blue:(CGFloat)blue alpha:(CGFloat)alpha; ...
分类:
其他好文 时间:
2020-04-07 00:12:09
阅读次数:
58
1.当static关键字修饰局部变量时,只会初始化一次且在程序中只有一份内存; @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor ...
分类:
其他好文 时间:
2020-03-31 22:32:59
阅读次数:
80
一、第一个就很厉害!色图网! https://flatuicolors.com/ 里边有很多颜色的汇总,对于我们这种色盲来说有很大帮助了嘤嘤嘤~ 二、第二个还是一个色图网!不过这是一个中国风的色图网~ http://zhongguose.com/ 很多很好看的中国风的颜色呢! 三、这是一个可以说是古 ...
分类:
Web程序 时间:
2020-03-29 01:19:51
阅读次数:
108
一、图片加载的工作流概括来说,从磁盘中加载一张图片,并将它显示到屏幕上,中间的主要工作流如下:假设我们使用 +imageWithContentsOfFile: 方法从磁盘中加载一张图片,此时的图片并没有解压缩;然后将生成的 UIImage 赋值给 UIImageView;接着一个隐式的 CATran... ...
分类:
移动开发 时间:
2020-02-26 14:12:52
阅读次数:
88
iOS 性能调试instrumentInstrumentInstrument之Core Animation工具避免图层混合①、确保控件的opaque属性设置为true,确保backgroundColor和父视图颜色一致且不透明;②、如无特殊需要,不要设置低于1的alpha值;③、确保UIImage没... ...
分类:
移动开发 时间:
2020-02-26 13:59:51
阅读次数:
87
NSArray*activityItems; //IMAGE if([strType isEqual:@"IMAGE"]) { UIImage*imageToShare = _iv.image; activityItems =@[imageToShare]; }else { NSURL*shareU ...
分类:
移动开发 时间:
2020-02-06 16:16:50
阅读次数:
91
1 // 颜色转换为背景图片 2 - (UIImage *)imageWithColor:(UIColor *)color { 3 CGRect rect = CGRectMake(0.0f, 0.0f, 1.0f, 1.0f); 4 UIGraphicsBeginImageContext(rect ...
分类:
移动开发 时间:
2020-01-04 14:12:50
阅读次数:
133