【发布时间】:2012-07-10 15:31:35
【问题描述】:
我已经阅读这些页面有一段时间了,但在正确加载我的 CGRect 时遇到了一些问题。我了解到这是因为我在 viewDidLoad 运行后强制定向,并且我试图让 CGRect 之后再次绘制。基本上,这就是我正在查看的内容:
-(void)viewDidLoad
{
//mybutton.frame = CGRectMake(...);
//...
}
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
return UIInterfaceOrientationIsLandscape(interfaceOrientation);
}
当视图出现时,CGRect 非常挤压和扭曲,因为视图的旋转。
【问题讨论】:
标签: objective-c ios xcode uiinterfaceorientation cgrect