Load Mails using pagination concept

query

#1

Hey,

I was looking to load cocuhbase mails using pagination concept. Yeah we have a method to pass the limit (mails count).Below is the method,

(CBLQuery*) select: (NSArray<CBLQuerySelectResult*>)select
from: (CBLQueryDataSource
)from
where: (nullable CBLQueryExpression*)where
groupBy: (nullable NSArray<CBLQueryExpression*>)groupBy
having: (nullable CBLQueryExpression
)having
orderBy: (nullable NSArray<CBLQueryOrdering*>)orderings
limit: (nullable CBLQueryLimit
)limit{

/** Logic goes here */

}

Here i have a doubt, if i give the limit 10/20, can be able to load those number of mails.I don’t need this requirement.

As soon as i scroll the table the view, i would like to pass the Offset value, so that i can be able to get the mails from there itself.

Here in the above code, i am not able to apply the pagination concept.

I would like to load 10 mails on each scroll, not bunch of mails at a time.

Any help would be appreciated…