UITableView goes under translucent Navigation Bar

前端 未结 14 1067
一整个雨季
一整个雨季 2020-12-22 23:51

I am trying to have a transparent navigation bar in IOS 7 app. There is a full screen image in my application. I am also having a UITableView over that image. When I use the

14条回答
  •  北海茫月
    2020-12-23 00:07

    All you need is love this:

    assert(tableView.contentInsetAdjustmentBehavior == .automatic)
    

    there is zero need to do ugly magic constants beardance from iOS 11 onwards

    I did not even need to set contentInsetAdjustmentBehavior to .none to fix navbar underlapping.

    .automatic
    

    worked automagically

提交回复
热议问题