0
我已經寫了一些代碼,用於顯示一個下拉列表,但下面的代碼不工作,當我使用。如何將我的代碼更改爲橫向?在iPad上</p> <pre><code>- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation{} </code></pre> <p>:
有沒有人有任何想法我可以如何解決這個問題?
我的代碼:
- (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;
}
}
幫我解決iPhone上的問題。