- (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 ))];
}
}
代码编写横屏的UIView
时间: 2024-11-05 12:24:51