I have some options in an UITableView and want that the user can scroll forever. When the end is reached, I want to append the begginning so the user can continue to scroll.
How would I do that?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In
tableView:numberOfRowsInSection:return some huge number, and act accordingly intableView:cellForRowAtIndexPath:by returning same cells over and over.You can also have limited number of rows, and at the end show a different cell – containing a button for user which he can use to append new rows. When that button is clicked you simply call
[tableView reloadData]and provide more rows in table’s data source.Aren’t you by any chance misusing the table-view for something it doesn’t fit that well ? Maybe you would be better off using just a UIScrollView and reposition subviews as user scrolls over.