Cocoa touch can';t在横向中设置tableview框架,参数设置但视图奇怪[附屏幕截图]

Cocoa touch can';t在横向中设置tableview框架,参数设置但视图奇怪[附屏幕截图],cocoa-touch,ios,ipad,uitableview,Cocoa Touch,Ios,Ipad,Uitableview,我尝试在横向模式下将UITableView的帧设置为(190,0610768)。帧参数设置正确,但显示不正确 为了对比结果,我在底部添加了一个框架相同的UIlabel: CGRect frame = CGRectMake(190, 0, 610, 768); UILabel *lbtb = [[UILabel alloc] initWithFrame:frame]; lbtb.backgroundColor = [UIColor cyanColor]; lbtb.text = @""; [se

我尝试在横向模式下将UITableView的帧设置为(190,0610768)。帧参数设置正确,但显示不正确

为了对比结果,我在底部添加了一个框架相同的UIlabel:

CGRect frame = CGRectMake(190, 0, 610, 768);

UILabel *lbtb = [[UILabel alloc] initWithFrame:frame];
lbtb.backgroundColor = [UIColor cyanColor];
lbtb.text = @"";
[self.view addSubview:lbtb];

dishMenuVC = [[DishMenuViewController alloc] init] ;
dishMenuVC.view.frame = frame;    
dishMenuVC.view.backgroundColor = [UIColor redColor];
dishMenuVC.view.alpha = 0.5;
[self.view addSubview:dishMenuVC.view];

我找到了解决这个问题的方法,创建了一个带有预期框架的容器UIView,并将tableview添加到其子视图中