UITableView in UINavigationController gets under Navigation Bar after rotation

前端 未结 8 890
清酒与你
清酒与你 2020-12-21 06:10

This is Portrait:

This is Landscape

I\'ve tried this on rotation with no success:

self.tableView.autoresizesSubviews = YE         


        
8条回答
  •  难免孤独
    2020-12-21 06:59

    Add the following line in the didRotateFromInterfaceOrientation method.

    [self.navigationController.view layoutSubviews];

    I hope this will do.

提交回复
热议问题