我正在开发产品存储应用,需要在其中实现UIStepper。问题是我不能像我希望的那样垂直放置它。
所以有人知道我能做到这一点吗?
答案 0 :(得分:1)
您应该能够修改变换:
stepper.transform = CGAffineTransformMakeRotation(M_PI / 2.0);
编辑:
我现在看到这对IB来说是个问题。我经常以编程方式创建我的观点,这似乎不是一个问题:
UIStepper *stepper = [[UIStepper alloc] initWithFrame:CGRectMake(150, 150, 27, 94)];
// this doesn't even have a problem:
UIStepper *stepper = [[UIStepper alloc] init];
这似乎只是IB的一个问题。在事实之后设置框架似乎也没有帮助。