我正在使用Autorotation for iPad,但我面臨一個奇怪的問題。自轉不能正常發生
問題是如果我開始使用ipad作爲縱向視圖並將ipad旋轉到橫向。它顯示的是大小而不是風景。以同樣的方式,如果我開始使用ipad作爲橫向視圖並將ipad旋轉到縱向視圖。它顯示了風景的大小,但不是人像。我正在使用下面的代碼來更改對象的大小
- (void)viewDidLoad {
UIInterfaceOrientation interfaceOrientation = self.interfaceOrientation;
if (interfaceOrientation == UIInterfaceOrientationLandscapeRight
|| interfaceOrientation == UIInterfaceOrientationLandscapeLeft)
{
table.frame = CGRectMake(83, 600, 550, 275);
im.frame = CGRectMake(0, 62, 775, 70);
im1.frame = CGRectMake(0, 135, 775, 40);
im2.frame = CGRectMake(60, 325, 650, 550);
l17.frame = CGRectMake(0, 62, 775, 70);
l16.frame = CGRectMake(85, 145, 780, 40);
l15.frame = CGRectMake(83, 200, 600, 40);
img.frame = CGRectMake(550, 300, 150, 110);
l18.frame = CGRectMake(28, 550, 650, 40);
b7.frame = CGRectMake(83, 880, 600, 40);
//[self.view addSubview:table];
}
[super viewDidLoad];
}
請問我最近出了什麼問題?
這是不是通過這種方法 –
面臨的大小問題,而只有旋轉的權利? – wesley