Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/112.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/objective-c/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios UIViewController中的TableView移动到窗口内的侧面_Ios_Objective C_Uitableview_Uiviewcontroller_Autoresize - Fatal编程技术网

Ios UIViewController中的TableView移动到窗口内的侧面

Ios UIViewController中的TableView移动到窗口内的侧面,ios,objective-c,uitableview,uiviewcontroller,autoresize,Ios,Objective C,Uitableview,Uiviewcontroller,Autoresize,我刚刚在UIViewController中放置了一个TableView,并通过情节提要将ViewController嵌入到NavigationController中。我实现了委托和源方法,除了第一次以横向模式加载视图,然后将其更改为纵向模式外,其他方法都可以正常工作TableView可以移动到窗口外的侧面并保持不变,但不会粘到边缘 PS:这是为在iPad上使用而设计的 编辑:添加另一个ss:找到了答案;方向更改后需要重新加载tableview。我猜这是一个自动布局错误,发生在横向->纵向方向改

我刚刚在
UIViewController
中放置了一个
TableView
,并通过情节提要将
ViewController
嵌入到
NavigationController
中。我实现了委托和源方法,除了第一次以横向模式加载视图,然后将其更改为纵向模式外,其他方法都可以正常工作
TableView
可以移动到窗口外的侧面并保持不变,但不会粘到边缘

PS:这是为在iPad上使用而设计的


编辑:添加另一个ss:

找到了答案;方向更改后需要重新加载tableview。我猜这是一个自动布局错误,发生在横向->纵向方向改变后

-(void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
    [self.tableView beginUpdates];
    [self.tableView endUpdates];
}

它可能与您如何使用autolayout或支柱和弹簧有关。