- (void) viewdidload {[Super viewdidload]; //additional setup after loading the view, typically from a nib.Uiimageview*imageview = [[Uiimageview alloc]initwithimage:[[uiimage imagenamed:@"Appiconimage"] [imagewithrenderingmode:uiimagerenderingmodeautomatic]];//automatically select render mode depending on where the picture is locatedUiimageview*imageview1 = [[Uiimageview alloc]initwithimage:[[uiimage imagenamed:@"Appiconimage"] [imagewithrenderingmode:uiimagerenderingmodealwaysoriginal]];//the image is rendered by default with the original color of the picture.Imageview1.frame = CGRectMake (0, -, ImageView1.frame.size.width, imageView1.size.height); Uiimageview*imageview2 = [[Uiimageview alloc]initwithimage:[[uiimage imagenamed:@"Appiconimage"] [imagewithrenderingmode:uiimagerenderingmodealwaystemplate]];//use blue as the rendering color, ignoring the color of the original pictureImageview2.frame = CGRectMake (0, Max, ImageView1.frame.size.width, imageView1.size.height); [Self.view Addsubview:imageview]; [Self.view Addsubview:imageview1]; [Self.view Addsubview:imageview2]; }
The following three functions are used to handle absolute values. Only the type of processing is different. int abs (int i); Handle the absolute value of the int type double fabs (double i); Handles the absolute value of the double type float FABSF (float i); Handling absolute values of float types
IOS Part API Understanding