标签:api 类型 部分 load log 渲染 ram 不同 fabs
- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. UIImageView *imageView = [[UIImageView alloc]initWithImage:[[UIImage imageNamed:@"AppIconImage"] imageWithRenderingMode:UIImageRenderingModeAutomatic]]; //根据图片所在的位置不同来自动选择渲染模式 UIImageView *imageView1 = [[UIImageView alloc]initWithImage:[[UIImage imageNamed:@"AppIconImage"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal]]; //默认采用图片的原始颜色来进行图片渲染 imageView1.frame = CGRectMake(0, 50, imageView1.frame.size.width, imageView1.size.height); UIImageView *imageView2 = [[UIImageView alloc]initWithImage:[[UIImage imageNamed:@"AppIconImage"] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]]; //采用蓝色作为渲染颜色,忽略原始图片的颜色 imageView2.frame = CGRectMake(0, 150, imageView1.frame.size.width, imageView1.size.height); [self.view addSubview:imageView]; [self.view addSubview:imageView1]; [self.view addSubview:imageView2]; }
//以下三个函数都用来处理绝对值的。只不过处理的类型不一样。 int abs(int i); // 处理int类型的取绝对值 double fabs(double i); //处理double类型的取绝对值 float fabsf(float i); //处理float类型的取绝对值
标签:api 类型 部分 load log 渲染 ram 不同 fabs
原文地址:http://www.cnblogs.com/Caersi/p/6683527.html