iOS orientation animation does not happen smoothly

If you apply any changes to the layer of underlying view.

for example,

shadowImageView.layer.masksToBounds = NO;
shadowImageView.layer.shadowOffset = CGSizeMake(-5, 0);
shadowImageView.layer.shadowOpacity = 1.0;


UIImageView rounded corners with border

If you are using a UIImageView to display the image you can simply do the following:

imageView.layer.cornerRadius = 5.0;
imageView.layer.masksToBounds = YES;

And to add a border:

imageView.layer.borderColor = [UIColor lightGrayColor].CGColor;
imageView.layer.borderWidth = 1.0;

I believe that you’ll have to import <QuartzCore/QuartzCore.h> and link against it for the above code to work.

Cited from:

Blogged with the Flock Browser