开发者

When reloading UITableView make it so it doesn't scrolls to thew top

开发者 https://www.devze.com 2023-03-07 10:42 出处:网络
I have an UITableView populated with a Twitter timeline. I also have scroll to refresh (like Tweetie/Twitter) and when user scrolls to refresh, new content is added to the top. How wo开发者_运维知识库

I have an UITableView populated with a Twitter timeline. I also have scroll to refresh (like Tweetie/Twitter) and when user scrolls to refresh, new content is added to the top. How wo开发者_运维知识库uld I do so the table view adds the content to the top of the actual position. In other way, I don't want to have the latest tweet the first at reload, instead new content should be added to the top of the actual position, having to scroll to the top to see latest tweets. Hope you guys have understood it as it could be a bit difficult to understand ;)


Thanks to @TheBlack, that helped me :)

Quote >

You could have taken a peek into UITableView class reference and you'd find – 
scrollToRowAtIndexPath:atScrollPosition:animated: – 
scrollToNearestSelectedRowAtScrollPosition:animated
0

精彩评论

暂无评论...
验证码 换一张
取 消