- (id )initWithFrame:(CGRect )frame
{
if (self = [super initWithFrame :frame])
{
// Important here, rotate THIS UIView
[ self setCenter: CGPointMake( 160.0f , 240.0f )];
[ self setTransform: CGAffineTransformMakeRotation(degreesToRadian ( 90 ))];
}
}
原文地址:http://www.cnblogs.com/XCoderLiu/p/3848106.html