github/twui — pull request #107 by luosheng (2012-10-12 05:40:30+00:00)
Title: TUIScrollView bug fixing

When `TUIScrollView` starts "throwing", it should respect its `contentInset`. The original code checks `self._pulling && _scrollViewFlags.didChangeContentInset` before updating its bounce values.

However, when it calls `self._pulling`, which is implemented by returning `_pull.xPulling || _pull.yPulling`, the `xPulling` and `yPulling` flags have already been reset to `NO` by the code blocks above it. So the condition evaluation is always `NO` and the code won't get a chance to execute.

I fix this by simply prefetch the pulling state of `TUIScrollView` before resetting it.