UITableView inside a Navigation Controller does not scroll after dismissing presentViewController

大兔子大兔子 提交于 2019-12-11 16:24:37

问题


I am showing a Modal Presentation View in a Navigation Controller by calling

[self.navigationController presentViewController:controllerA animated:YES completion:nil];

And I am dismissing the controllerA by calling

[self.presentingViewController dismissViewControllerAnimated:YES completion:nil]

After the dismiss is done the UITableView in in the previous navigationController does not scroll up and down where as it did before the presentViewController was called. Do I need to do something after dismiss to make the UITableView scroll again.


回答1:


The problem was that I had a Header View in the UITableView and I needed to uncheck the "Use Autolayout" (in the File Inspector section) from the Xib file as I was loading the Header from a Xib.

Unexpected scroll behavior after adding rows to UITableView



来源:https://stackoverflow.com/questions/18369449/uitableview-inside-a-navigation-controller-does-not-scroll-after-dismissing-pres

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!