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

前端 未结 4 1589
旧巷少年郎
旧巷少年郎 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 21:52

    Try commenting out the reloadData call. If I'm understanding your question correctly, and you're in viewDidLoad, you should not need to call it anyway.

    Also, if you've just gotten done pushing the view controller, you won't get an animated scroll. You'll have to insert a delay (I've found a quarter second works well) between the time that viewDidLoad was called and when your animation starts.

提交回复
热议问题