Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Nitin Eusebius](https://secure.gravatar.com/avatar/9993f3bc8700f3f32e2119ba77247333?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Nitin Eusebius
2,738 PointsBlog reader app - Table cells touching the header
Hi - I am working on the IOS7 and when I run the table view, the cell starts with on the top. Touching the top of the simulator. Is anyone facing same issue?
6 Answers
![Thomas Nilsen](https://secure.gravatar.com/avatar/897eff05ae62fe42b8a2109867700453?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Thomas Nilsen
14,957 PointsOr you could do something like this:
NSInteger cellCount = [self tableView:tableView numberOfRowsInSection:indexPath.section];
return self.view.frame.size.height / (CGFloat)cellCount;
That is what you put inside of the delegate method
![Amit Bijlani](https://uploads.teamtreehouse.com/production/profile-photos/5393/micro_NewProfile2.jpg)
Amit Bijlani
Treehouse Guest TeacherI've answered this here: https://teamtreehouse.com/forum/the-status-bar-is-in-the-way
![Thomas Nilsen](https://secure.gravatar.com/avatar/897eff05ae62fe42b8a2109867700453?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Thomas Nilsen
14,957 PointsYou need to implement
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
}
It's one of the tableView's delegates .
![Nitin Eusebius](https://secure.gravatar.com/avatar/9993f3bc8700f3f32e2119ba77247333?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Nitin Eusebius
2,738 PointsHi Thomas,
Thanks. I am pretty new to IOS dev. What kind of code would go into this
Thanks, Nitin
![Thomas Nilsen](https://secure.gravatar.com/avatar/897eff05ae62fe42b8a2109867700453?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Thomas Nilsen
14,957 PointsThe function returns a float. So If you were to write "return 60.0f" (Try it out), that would happen to all the cells. What you need to do, is locate the first cell and set the approriate height :)
![Nitin Eusebius](https://secure.gravatar.com/avatar/9993f3bc8700f3f32e2119ba77247333?s=96&d=https%3A%2F%2Fecs-static.teamtreehouse.com%2Fassets%2Fcontent%2Fdefault_avatar-445fbbabfc8dc9188fb5967fe43322ee0c3e0dd1e10f378bf8343784af5a13eb.webp&r=pg)
Nitin Eusebius
2,738 Pointscool thanks this work. I was wondering that is this a bug or a feature that came with IOS 7 and X5? It was not the case previously