我在 UISplitViewController(在 UITabbarController 中)中有一个 UITablevView。当我从横向开始时,我的桌子太长了,所以我设置了
CGRect frame = self.view.frame;
switch([[UIApplication sharedApplication] statusBarOrientation]) {
case UIInterfaceOrientationLandscapeRight:
frame.size.height = 768-20-44;
self.view.frame = frame;
break;
case UIInterfaceOrientationLandscapeLeft:
frame.size.height = 768-20-44;
self.view.frame = frame;
break;
case UIInterfaceOrientationPortrait:
frame.size.height = 1024-20-44;
self.view.frame = frame;
break;
case UIInterfaceOrientationPortraitUpsideDown:
frame.size.height = 1024-20-44;
self.view.frame = frame;
break;
}
这行得通。但是当我的 SearchDisplayController(也有错误的长度)隐藏时,我的 tableview 又太长了。我能做些什么?