Hi all,
I'm having a tableview with 20 rows and 250 as their rowheight. While I'm at the bottom of the tableview, I want to shift the tableview upwards by 65px. I tried doing
self.tableView.contentInset = UIEdgeInsetsMake(-65.0f, 0.0f, 0.0f, 0.0f);
Also
self.tableView.contentInset = UIEdgeInsetsMake((4633.0f - 65.0f), 0.0f, 0.0f, 0.0f);
where 4633.0f is my contentoffset.y, but with no success.
When the last cell is pulled upwards, I'm showing a view below the last cell with an activity indicator on it to depict that more data is getting loaded. I need to keep that view visible for 3 seconds so I want to push the tableview cells up and after that I want to bring the tableview to its original position and reset the view below that.
I'm doing this
EDIT: This' taking the tableview inset up in 2 seconds:
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.2];
// self.tableView.contentInset = UIEdgeInsetsMake((4633.0f - 65.0f), 0.0f, 0.0f, 0.0f);
self.tableView.contentInset = UIEdgeInsetsMake(- 65.0f, 0.0f, 0.0f, 0.0f); //I want to know what should be written here
[UIView commitAnimations];
and then calling a function to reset it back as
This' bringing the tableview inset back in 3 seconds:
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:.3];
[self.tableView setContentInset:UIEdgeInsetsMake(0.0f, 0.0f, 0.0f, 0.0f)];
[UIView commitAnimations];
Can anybody please suggest how to do it?
Thanx in advance.