Animation effects
- (void) Touchesbegan: (Nsset *) touches withevent: (Uievent *)Event{[UIView animatewithduration:1animations:^{ //Rotate//_imageview.layer.transform = Catransform3dmakerotation (M_PI, 1, 1, 0); //panning//_imageview.layer.transform = catransform3dmaketranslation (200, 200, 0); //Zoom//_imageview.layer.transform = Catransform3dmakescale (1, 0.5, 1); //using KVC to change the deformation//nsvalue *rotation = [Nsvalue valuewithcatransform3d:catransform3dmakerotation (M_PI, 1, 1, 0)]; //[_imageview.layer setvalue:rotation forkeypath:@ "transform"]; //[_imageview.layer setValue: @M_PI forkeypath:@ "Transform.rotation"]; //[_imageview.layer setvalue:@0.5 forkeypath:@ "Transform.scale"]; //Pan x Axis[_imageview.layer setvalue:@ $Forkeypath:@"transform.translation.x"]; }];}
Border, rounded, cropped
- (void) imagelayer{//Circular cropping_imageview.layer.cornerradius = -; //cut out all of the layer borders_imageview.layer.maskstobounds =YES; _imageview.layer.bordercolor=[Uicolor Whitecolor]. Cgcolor; _imageview.layer.borderwidth=2;}- (void) viewlayer{//Set Shadow Transparency_redview.layer.shadowopacity =1; //Set Shadow color_redview.layer.shadowcolor =[Uicolor Yellowcolor]. Cgcolor; //set the radius of a shadow fillet_redview.layer.shadowradius =Ten; //set the fillet radius_redview.layer.cornerradius = -; //Set Border radius_redview.layer.bordercolor =[Uicolor Whitecolor]. Cgcolor; //Set Border radius_redview.layer.borderwidth =2;}
iOS 18th day (1, core animation layer, rotate, scale, pan, border, trim, fillet)