分类:
2009-10-22 15:40:36
@implementation PoseDetailContentView
- (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))];
2.
该view中的其他子视图使用原计划的坐标,添加到横屏中即可.
补充:
下面的代码,可以让UIView即旋转,又缩放.
CGAffineTransform transform = CGAffineTransformMakeRotation(degreesToRadian(60)); transform = CGAffineTransformScale(transform, 0.5, 0.5); [self setTransform: transform]; // this effects the SUBVIEWS rotate and scale