UA-17470720-3

Jump to content


Photo
- - - - -

how to show first 20 items in the tableview with 'load more' or 'next' button on the bottom to show another 20 items ?

sections web-services general models

  • Please log in to reply
5 replies to this topic

#1 Balachandhar

Balachandhar

    Experienced Member

  • STV 3.0 Pro
  • PipPipPipPip
  • 87 posts
Reputation: 21
Excellent

Posted 02 October 2013 - 05:31 AM

Hi,

 

I have 400 items in the server, i am pulling all the items from the server using webservice and showing them on the tableview.  I would like to fetch and show only 20 items in the first time. 

 

If user select the 'load more' then i need to show another 20 like that.

 

is it posible to do it in STV? 

 

thanks,

bala


  • cratrenue and hwf9vjkj8s2 like this

#2 Dave Guerin

Dave Guerin

    Forum Master

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 541 posts
  • LocationIreland
Reputation: 134
Popular

Posted 02 October 2013 - 05:47 AM

Hi bala,

 

I think there's a

batchSize 

 

 that you can set when fetching items.


Cheers,

Dave

www.dgapps.ie

#3 Balachandhar

Balachandhar

    Experienced Member

  • STV 3.0 Pro
  • PipPipPipPip
  • 87 posts
Reputation: 21
Excellent

Posted 02 October 2013 - 07:51 PM

Hi Dave,

 

Could you tell me where i have to use batchSize? if posible, show me the code snippet.

 

I am using SCArrayOfObjectsModel.

 

thanks,

bala


Edited by Balachandhar, 03 October 2013 - 05:38 AM.


#4 Dave Guerin

Dave Guerin

    Forum Master

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 541 posts
  • LocationIreland
Reputation: 134
Popular

Posted 04 October 2013 - 05:21 AM

Hi bala,
 
In the PDF book:

http://sensiblecocoa...e-tableview-30/

page 28 onwards, Exploring Web Service Binding, shows how to use a SCArrayOfObjectsSection with a webServiceDefinition and a batchSize.
 
Does that code snippet help?


Cheers,

Dave

www.dgapps.ie

#5 Balachandhar

Balachandhar

    Experienced Member

  • STV 3.0 Pro
  • PipPipPipPip
  • 87 posts
Reputation: 21
Excellent

Posted 18 October 2013 - 11:58 AM

no, the thing is i am using coredata, i used SCArrayOfObjectModel throughout my app. now i want to implement load more cell. 

 

note:backend is stackmob

 

is it posible to use batch, load more cell in SCArrayOfObjectModel? 

is it the load more cell wil only posible when i use SCArrayOfObjectSection?

 

thanks

bala



#6 ozie

ozie

    ¯\_(ツ)_/¯

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 526 posts
  • LocationAustralia
Reputation: 169
Popular

Posted 15 November 2013 - 11:31 PM

objectModel.dataFetchOptions.batchSize = 20

Edited by ozie, 16 November 2013 - 10:18 PM.

P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.






Also tagged with one or more of these keywords: sections, web-services, general, models

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users