2011-10-22 2 views
0

시뮬레이터에서 문제가 생존하지 않으면 가로 방향으로 자동 회전 한 후 뷰에 문제가 있습니다. 앱을 세로 방향으로로드하면 모두 정상적으로 작동하지만 기기를 회전하면 (iPod touch 1 세대 3.1.3) 결과가 가로로 표시됩니다 (http://imageshack.us/photo/my-images/155/img0021n.png/). 두 번째보기 ("Riepilogo"즉 표보기)로 전환 한 다음 첫 번째보기로 돌아 가면보기가 완벽하게 가로 방향으로 맞춰 지지만 다시 세로 방향으로 회전하면 문제는 위와 같습니다.뷰를 회전 한 후 화면에 맞지 않는 경우

- (BOOL)shouldAutorotateToInterfaceOrientation(UIInterfaceOrientation)interfaceOrientation{ 
if (interfaceOrientation==UIInterfaceOrientationLandscapeLeft || interfaceOrientation==UIInterfaceOrientationLandscapeRight) { 

    [self.scrollView setContentSize: CGSizeMake(480,416)]; 

} else { 

    [self.scrollView setContentSize: CGSizeMake(320, 416)]; 

} 

return (interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight); } 

추신 : 여기

는 shouldAutorotateToInterfaceOrientation의 코드 UIScrollView의 뷰입니다.

답변

0

스크롤 뷰의 크기를 조정해도 내용의 크기가 조정되지 않습니다.

+0

그럼 어떻게해야합니까? – Lolloz89

+0

scrollview에 하위보기가 있습니다. 크기를 조정하려는 크기를 조정하십시오. – NSResponder

관련 문제