-(void)transform:(UIView *)view
{
CABasicAnimation *rotation = [CABasicAnimation animationWithKeyPath:@"transform.rotation"];
[rotation setFromValue:@0.0f];
[rotation setToValue:[NSNumber numberWithFloat:((360*M_PI)/180)]];
[rotation setDuration:1.5f];
rotation.repeatCount=NSNotFound;
rotation.autoreverses=YES;
[view.layer addAnimation:rotation forKey:@"transform.rotation"];
}