iPhone SDK - How to scroll a UITableView programmatically with animation?

前端 未结 4 1588
旧巷少年郎
旧巷少年郎 2021-02-19 21:48

How would I scroll a UITableView to a specific position with an animation?

Currently I\'m using this code to jump to a position:

 //tableController ->         


        
4条回答
  •  孤城傲影
    2021-02-19 22:12

    I have two suggestions for you to investigate:

    1. Are you running your app on the simulator or the iPhone itself? I have noticed some animations behave differently in the simulator.

    2. Is it possible you are calling scrollToRowAtIndexPath:atScrollPosition:animated twice in quick succession? This can 'confuse' the animation. You should call this function only once while processing a given event.

提交回复
热议问题