Items still overlapping the status bar when scrolling up?


#1

I’ve finished the section Content Insets, and while the items are now spaced nicely under the status bar with some padding on initial display, if I scroll up, the item texts goes right through the status bar. The text at the end of the section “The table view cell content no longer underlaps the status bar when the table view is scrolled to the top” suggests that this shouldn’t happen (??).

Anyone else seeing this same behavior?

~ Thanks ~


#2

I see the same thing. I think you are interpreting the text incorrectly. It doesn’t make the blanket statement:

Instead, the text qualifies that statement with:

With the benefit of hindsight, the authors did not mean:

What they meant was:

I thought that maybe one of the challenges would address the ugly underlap while scrolling. I’m kind of surprised that the view’s height does not automatically take the status bar into account by default.


#3

Yes the conversation is old … but I just got here. I also expected the insets to keep the content from overrunning the header. Too bad no one responded. Guess they’re too busy to keep up with us. I’m gonna try setting my margins so the scrolled content is clipped. I think the WorldTrotter one did that. Anyhoo … enough for one day unless anyone else has a bright idea


#4

It turns out that was the old default behavior. Apple’s new default behavior is to underlap the status bar–I guess they think that makes the screen appear bigger. See here:

https://developer.apple.com/library/ios/qa/qa1797/_index.html

When you are working with a NavigationBar or a TabBar, then see here:

http://stackoverflow.com/questions/37963382/contentinset-not-updated-when-view-is-added-as-subviews


#5

Thanks for the links. If you implement override func tableView(tableView: UITableView, titleForHeaderInSection section: Int) -> String as shown in another answer then the section headings conveniently (and probably correctly) stop just below the top status bar when you scroll down. But the content continues to scroll up and is visible beneath the status bar.

That’s it for me on this topic. Moving to chapter 10.


#6

Just wondering if there is a good solution for this yet. I have not been able to get the cells to stop underlapping the status bar despite trying the most popular answers on stack exchange.