iOS 7 UITableView: How to remove space between navigation bar and first cell

前端 未结 15 2400
Happy的楠姐
Happy的楠姐 2020-12-04 07:15

Description of the problem: with iOS 7 in grouped UITableView there is a gap between the top of the table view and the first cell.

The strange part is th

15条回答
  •  忘掉有多难
    2020-12-04 07:49

    I was seeing this extra space at the top of one of my table views in a very strange situation.

    After I added a UIScrollView as the root view of my first controller in my navigation stack, if I presented the next controller as a Show Detail segue, my next controller would have the space above its table view.

    The solution for me was to change the segue to Present Modally and everything went back to normal.

    The strangest part of the segue changing was that before I added my root view being a UIScrollView, my Show Detail segue was presenting the next controller modally. Yet after I added the root UIScrollView, the Show Detail segue was pushing on the next controller (which was not what I wanted).

提交回复
热议问题