Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

iOS Build a Blog Reader iPhone App Rebuilding from Scratch Adding a Table View Controller Class

Jan Aart Schipper
Jan Aart Schipper
2,591 Points

First cell in Table View overlapping with status bar

Hi,

When I'm building my app in the simulator there's an overlap of the first cell and the "carrier" and "wifi signal sign".

There must be an easy way to get this done, but I can't find it. If i'm not clear enough, I will post a screenshot.

Thanks in advance.

Jan from the Netherlands.

Jan Aart Schipper
Jan Aart Schipper
2,591 Points

I think I've got it!

I have dragged a UIView to the top of the table view. Then I made it the height I wanted. (Guess the status bar height is 20px?)

It did solve my problem, I just think it's a bit odd that Xcode doesn't figure it out for me.

3 Answers

Stone Preston
Stone Preston
42,016 Points

what you did to fix it is correct. In iOS 7, the status bar is transparent, so anything you have on screen will be displayed under it. It doesnt float down below the status bar like it did in iOS 6 (when the video was made)

I think that workaround is not a good idea, look here how the section titles are affected by the same problem: https://www.youtube.com/watch?v=YSzdDje2xC8

I have found this link very good article that helps avoiding that problem in the proper way: actually using a table view inside a classic view controller

Since table views are often used for navigating as in master-detail templates, embedding the table view controller in a navigation view controller also solves this problem.