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