Eswar
Eswar

Reputation: 199

Which method will be used to getItemCount (no of cards) when using MDCCardCollectionCell?

I am new to IOS.I used to work as Android developer. I am using MDCCardCollectionCell/MDCCard for Cardviews in my project. When i was working on android, to display number of cards - we used to return number in getItemCount() Adapter class. Similarly, i want to know which method (or) where should we return cards count?

Example : if i give return 4 , 4 cardviews should display on screen.

Thanks in advance.

Upvotes: -1

Views: 49

Answers (1)

Akash Soni
Akash Soni

Reputation: 535

you should use the numberOfItemsInSection method for the count of total items.

check this example here

Upvotes: 0

Related Questions