My tableView's is "low"


#1

Once I set up the tableView, and then build and run, all goes well, no errors, but my table starts almost at the bottom of the app screen, screenshot below:

I have checked my code a few times and it is all the same as the book presents, I was assuming I had put a parameter wrong in the headerView method

I changed ‘w’ to ‘w-270’, which fixed the problem and brought the table back up near the button, but once I click the “Edit” button, it goes back to its position as seen above…

I’m not sure what I am doing wrong here, I have checked my code with the books as well as the code in the update OS4 solutions…

Obviously this is not a problem that really affects anything serious, but I’d like to get it fixed before I get too much further.
Any suggestions?


#2

Hi,

Are you returning width instead of height in this method ?

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
	return [[self headerView] frame].size.height;

Gareth


#3

[quote=“GarethR”]Hi,

Are you returning width instead of height in this method ?

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
	return [[self headerView] frame].size.height;

Gareth[/quote]

And there it is… thanks a lot !! I knew it was something simple I was missing, I don’t know how I missed it!
Thanks again