UITableView - contentOffset glitch
I'm running into problems with UITableView's contentOffset
property. To illustrate the problem, I have subclassed UITableView
and log all changes. Here's an example:
- (void)setContentOffset:{0, 0} ({0,开发者_如何学Go 97})
- (void)setContentOffset:{0, 0} ({0, 0})
- (void)setContentOffset:{0, 97} animated:NO ({0, 0}) <--
- (void)setContentOffset:{0, 97} ({0, 0})
- (void)setContentOffset:{0, 0} animated:YES ({0, 97}) <--
- (void)setContentOffset:{0, -1} ({0, -0})
- (void)setContentOffset:{0, -3.5} ({0, -1})
- (void)setContentOffset:{0, -7} ({0, -3.5})
- (void)setContentOffset:{0, -12} ({0, -7})
- (void)setContentOffset:{0, -18.5} ({0, -12})
- (void)setContentOffset:{0, -26.5} ({0, -18.5})
- (void)setContentOffset:{0, -33.5} ({0, -26.5})
- (void)setContentOffset:{0, -41.5} ({0, -33.5})
- (void)setContentOffset:{0, -49.5} ({0, -41.5})
- (void)setContentOffset:{0, -58.5} ({0, -49.5})
- (void)setContentOffset:{0, -66.5} ({0, -58.5})
- (void)setContentOffset:{0, -74} ({0, -66.5})
- (void)setContentOffset:{0, -81} ({0, -74})
- (void)setContentOffset:{0, -87} ({0, -81})
- (void)setContentOffset:{0, -91.5} ({0, -87})
- (void)setContentOffset:{0, -94.5} ({0, -91.5})
- (void)setContentOffset:{0, -96.5} ({0, -94.5})
- (void)setContentOffset:{0, -97} ({0, -96.5})
FINAL contentOffset = {0, -97}
I have marked the calls I make with arrows. The values in parentheses are the current values, the values behind the colons are the values to be set.
Now, as you can see the table view should set the content offset from {0, 97}
to {0, 0}
but it actually sets the content offset from {0, 0}
to {0, -97}
. What is going on?!
精彩评论