UITableview does not view last cell when scrolling down

I am very new to iOS. I have a UITableView that is populated with a lot of custom cells, but the bottom cell does not display properly when scrolling down. The Y value for the UITableView is 44 and the height is 480. When scrolling down, only half of the last cell is displayed. How can I fix this problem.

Thanks in advance.

+16
ios uitableview scroll
Aug 13 2018-12-12T00:
source share
5 answers

Use -

tableView.contentInset = UIEdgeInsetsMake(0, 0, 120, 0); //values 

- top, left, bottom, right

Skip the bottom offset to suit your needs.

+59
Aug 13 2018-12-12T00:
source share

this is because you incorrectly configured the table view frame, if your view has a navigation bar, usually use this code:

 CGRect frame = self.view.bounds; frame.height -= 44; 

44 is the height of your navigation bar.

+3
Aug 07 '13 at 9:35 on
source share

If you have a status bar visible from above, then it will occupy 20 pixels, which will push your TableView the same. To avoid this, make the table height height 460 instead of 480.

+2
Aug 13
source share

If you are on iOS7 and using the navigation panel of the navigation controller, make sure it is set translucent:

  self.navigationController.toolbar.translucent = NO; 
0
Feb 15 '14 at 3:58
source share

It worked for me.

I commented on my code

 -(void)viewWillLayoutSubviews { dispatch_async(dispatch_get_main_queue(), ^{ //This code will run in the main thread: CGRect frame = tableViewObj.frame; frame.size.height = tableViewObj.contentSize.height;//commenting this code worked. tableViewObj.frame = frame; }); } 

What is it. It worked for me. Make sure that you do not change the frame of the table where in the implementation file.

0
Aug 28 '15 at 12:39 on
source share



All Articles