0

嗨,目前正在开发一个 ipad 应用程序,我需要在其中显示 tableview。所以我们用自定义单元格显示表格视图。现在问题是当应用程序处于横向模式时,我的自定义单元格中有一个布局,当应用程序旋转到纵向模式时,布局应该改变。任何帮助将不胜感激。

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 回答