Start jitter
-(void) beginwobble{Srand ([[NSDate Date] timeIntervalSince1970]);Float rand= (float) random ();Cftimeinterval t=rand*0.0000000001; [uiview animatewithduration:0.1 delay:t options:0 animations:^ {view to dither .transform= Cgaffinetransformmakerotation (-0.05);} completion:^ (BOOL Finished) {[uiview animatewithduration:0.1 Delay:0 options:uiviewanimationoptionrepeat| uiviewanimationoptionautoreverse| uiviewanimationoptionallowuserinteraction animations:^ {view to Jitter .transform=cgaffinetransformmakerotation (0.05); } completion:^ (bool finished) {}]; }];}
/span>
Stop jitter
-(void)EndWobble{ [UIView animateWithDuration:0.1 delay:0 options:UIViewAnimationOptionAllowUserInteraction|UIViewAnimationOptionBeginFromCurrentState animations:^ { 要抖动的视图.transform=CGAffineTransformIdentity; } completion:^(BOOL finished) {}];}
iOS icon jitter effect