Mukesh
Mukesh

Reputation: 797

I want to set pagination using PREV and NEXT button using Objective C?

I want to set pagination with Prev and Next button at bottom of tableview and each page will display 100 records. How can I do this, Any help will be appreciated.Thanks!

My web Request API is designed as follow:

/getRecorods?pageSize=100&pageNo=1

Upvotes: 2

Views: 413

Answers (1)

Mukesh
Mukesh

Reputation: 797

Just created global array called jsonArray and one int for pagesize constant of 100, and pageNo start with 1. When you tap next button just increment pageNo +=,and decrement pageNo -= if tapping previous button.The object you get from server, parse into jsonArray and reload tableview.

Thanks for your time.

Upvotes: 2

Related Questions