I am showing a view Controller with a self sizing tableview inside a Container view. See green color view in image 1.
If the device orientation changed to Landscape mode, the UI has no issues and shows exactly as I want. See below image.
But if I changed orientation back to portrait mode, then the height of the tableview inside Containerview doesn’t get updated.I have added a purple background color to tableview. See below image.
I have tried view.setNeedsLayout()
, containerView.setNeedsLayout()
, view.layoutIfNeeded()
inside the viewWillTransition
function. But still no success.
Please some one help to fix this issue.