automaticallyAdjustsScrollViewInsets not working

后端 未结 5 1602
终归单人心
终归单人心 2020-11-29 01:25

I\'ve created an extremely simple demo app to test the functionality of automaticallyAdjustsScrollViewInsets, but the last cell of the tableView is covered by m

5条回答
  •  鱼传尺愫
    2020-11-29 01:35

    Your view controller must be directly on a UINavigaitonController's stack for automaticallyAdjustsScrollViewInsets to work (i.e. not a child view controller)

    If it is a child view controller of another view controller which is on the navigation stack, you can instead set automaticallyAdjustsScrollViewInsets = NO on the parent. Alternatively you can do this:

    self.parentViewController.automaticallyAdjustsScrollViewInsets = NO;
    

提交回复
热议问题