views:

49

answers:

1
[self.tableView setContentOffset:CGPointMake(0,48) animated:NO];

I have a UITableView that has a a UIView in the header. My UITableView won't scroll to (0,48) unless animated: YES. I don't want it to animate.

Anyone know whats up?

A: 

You can try the method named -scrollRectToVisible:animated.


I misunderstand your question. So, what you want is to initialize the tableview with a shift of y-coordinate about 48 pixels ?

This will make the tableView begin from yPos 48.

tableView.contentInset = UIEdgeInsetsMake(48, 0.0, 0.0, 0.0);

Hope this can help you....

Toro
self.tableView won't respond to scrollRectToVisible
Sheehan Alam
Sorry for misunderstand your question. I am curious about self.tableView.contenOffset = CGPointMake(0,48) works or not.
Toro
Neither worked unfortunately.
Sheehan Alam