ios - OnScroll Load more data -




i implemented search api , working fine in ios objective c. getting result server. , again need call same service when scroll end on tableview. , need pass parameter "page=2" @ same time on same page. , need show next page data on table view end.

this pagination concept.

please go through link , better idea : swift tableview pagination

i can show have done in project :

    func tableview(tableview: uitableview, willdisplaycell cell: uitableviewcell, forrowatindexpath indexpath: nsindexpath) {     if indexpath.row = arraydatafortable.count && page <= totalnumberofpages {         page += 1     } } 

in above code arraydatafortable contains data show in table. if user has scrolled last cell adding page count increase code. getting "totalnumberofpages" api , maintaining page count "page" locally starting 0.

for objective c use method:

    - (void)tableview:(uitableview *)tableview willdisplaycell:(uitableviewcell *)cell forrowatindexpath:(nsindexpath *)indexpath; 




wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -