Open Alkalouti opened 11 years ago
I added a control like what you want (Pull to load more). Check here : https://github.com/sibahota059/SPHChatBubble
hi @sibahota059 thanks for your advice and you create great job ,but am looking for load more data same whatsapp when you load earlier messages loading data on top of the table
@Alkalouti Hi, I can understand your questioon. I did the same thing in my app. download and run my code, and try to pull the table, in console you can see load more data. you can implement your function there to get the earlier messages. add that data to Array in Descending order and Reload the tableview.
If you already tried anything like that, write the code you are trying, i can guide you.
@sibahota059 Hi, first i want to thank you .
i had finished work at load earlier message and its working successfully, but i have a small problem when reload the data the table scroll to top i want to keep the table on the same place, i add the old data in object at index 0 now i need to reload the table without scrolling .
@Alkalouti Hi, if you adding the data in index 0 , then take the user to top of the table view once the data is added to the array.
[mainTableView scrollRectToVisible:CGRectMake(0, 0, 1, 1) animated:YES];
@sibahota059 Hi, now it's work good thank you so much my friend, when i'm add at the index 0 on table view the every index have a section on table, i used this code and it's work as i need :-) [self.TableView reloadData]; [self.TableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:5] atScrollPosition:UITableViewScrollPositionTop animated:NO]; thanks again for your advice .
First let me thank you for this great job , how can i add load more of the top off table view