0

こんにちは、現在、テーブルビューを表示する必要があるiPadアプリに取り組んでいます。そのため、カスタムセルでテーブルビューを表示しています。問題は、アプリケーションが横向きモードのときにカスタムセルにレイアウトがあり、アプリが縦向きモードに回転するとレイアウトを変更する必要があることです。

4

1 に答える 1

0

これを試して、

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
    if (UIInterfaceOrientationIsLandscape(toInterfaceOrientation)) {
        //your code for landscape
    } else {
        //your code for portrait
    } 
}

これはあなたを助けるかもしれません.....

于 2012-09-11T13:19:41.540 に答える