***
#import "HMViewController.h"#defineAngle2radian (x) ((x)/180.0 * M_PI)@interfaceHmviewcontroller () @property (weak, nonatomic) Iboutlet Uiimageview*ImageView;@end@implementationHmviewcontroller- (void) viewdidload{[Super Viewdidload]; //additional setup after loading the view, typically from a nib.Uilongpressgesturerecognizer*longpress=[[Uilongpressgesturerecognizer alloc] initwithtarget:self action: @selector (longpress:)]; [_imageview addgesturerecognizer:longpress];}- (void)longpress:(Uilongpressgesturerecognizer *) longpress{if(Longpress.state = =Uigesturerecognizerstatebegan) {cakeyframeanimation*anim =[cakeyframeanimation animation]; Anim.keypath=@"transform.rotation"; Anim.values= @[@ (Angle2radian (-5), @ (Angle2radian (5), @ (Angle2radian (-5))]; Anim.repeatcount=maxfloat; Anim.duration=0.5; [_imageview.layer Addanimation:anim Forkey:nil]; }}@end
iOS 18th day (7,cakeyframeanimation-icon jitter)