Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UITableview not visible the last cell when scroll down

Tags:

I'm very new to iOS. I have a UITableView that filled with many custom cells, but the bottom cell is is not visible properly when scroll down.my Y value of the UITableView is 44 and Height is 480. Only the half of the last cell is visible when scroll down. How can I fixe this problem.

Thanks in advance.

like image 873
iDia Avatar asked Aug 13 '12 04:08

iDia


2 Answers

it is because you set your tableview's frame wrong, 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.

like image 29
jianpx Avatar answered Sep 17 '22 19:09

jianpx


Use -

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

passed are - top, left, bottom, right

Pass bottom offset as per your needs.

like image 114
rishi Avatar answered Sep 20 '22 19:09

rishi