代码编写横屏的UIView
- (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 ))];
}
}