2012-06-20 6 views
0

나는 드롭 다운 목록을 표시하기위한 몇 가지 코드를 작성했습니다,하지만 아래의 코드는 내가 사용하는 경우 작동하지 않습니다 :코드를 가로 방향으로 변경하는 방법은 무엇입니까?

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{} 

을 아이 패드에.

이 문제를 해결할 수있는 아이디어가있는 사람이 있습니까?

내 코드 :

- (void)dropDownCellSelected:(NSInteger)returnIndex{ 
    [button setTitle:[arrayData objectAtIndex:returnIndex] forState:UIControlStateNormal]; 
} 


- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation 
{ 
    // Return YES for supported orientations 
    if (UIInterfaceOrientationIsLandscape(interfaceOrientation)){ 
     return YES; 
    } else { 
     return NO; 
    } 
} 

도움말 나 아이폰에 문제를 해결하기 위해.

답변

1
[[UIApplication sharedApplication] setStatusBarOrientation:UIInterfaceOrientationLandscapeLeft animated:NO]; 
관련 문제