//create rect
UIImageView *myImageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"my_image.png"]];
//set point of rotation
myImageView.center = CGPointMake(100.0, 100.0);
//rotate rect
myImageView.transform = CGAffineTransformMakeRotation(M_PI_2); //rotation in radians
this code will rotate the button..
same way u can rotate imageview.
see this:
Rotate image in Quartz? Image is upside down! (iPhone)