Adding circular rotation animation to a UIView or UIimageView in ios

– (void)animateImageViewRight:(UIImageView *)imageView {
CABasicAnimation *fullRotation;
fullRotation = [CABasicAnimation animationWithKeyPath:@”transform.rotation”];
//fullRotation.fromValue = [NSNumber numberWithFloat:0];
fullRotation.fromValue = [NSNumber numberWithFloat:0];
fullRotation.toValue = [NSNumber numberWithFloat:((360*M_PI)/180)];
fullRotation.duration = 99.0f;
fullRotation.removedOnCompletion = NO;
fullRotation.fillMode = kCAFillModeForwards;
fullRotation.repeatCount = MAXFLOAT;
[imageView.layer addAnimation:fullRotation forKey:@”360″];


UILabel with Rich text in ios/ipad application

NSMutableAttributedString *text = [[NSMutableAttributedString alloc] initWithString: @”The color is Red”];
[text addAttribute: NSForegroundColorAttributeName value: [UIColor redColor] range: NSMakeRange(13, 3)];
[label setAttributedText: text];

Above code can give you a UIlabel like this one.

The color is Red

Create a free website or blog at

Up ↑