JoniVR / VerticalCardSwiper

A marriage between the Shazam Discover UI and Tinder, built with UICollectionView in Swift.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CardSwiper.reloadData () does not work

STAMFORD313 opened this issue · comments

CardSwiper.reloadData() does not work

New problem checklist

Description of the problem

CardSwiper.reloadData() does not work
Attempt to download data from the database and load before the card number function and do not reload after displaying the number of letters,
Please help !!
Thank you

Ambient

  • Version for iOS: 10.13.6
  • Device(s): Mac Mini
  • Xcode Version: Version 10.1

Hi @STAMFORD313

It's pretty hard to help you without seeing your code, so it would be better to add the code that is causing the issue in here.

If you haven't done so already, make sure you call the function on a background thread. UIKit isn't thread safe. Like this:

DispatchQueue.main.async {
    cardSwiper.reloadData()
}

But this is probably something with your own code and not an issue with the Library as this function does nothing more than call the underlying reloadData() function of the UICollectionView.

This is what it does under the hood:

public func reloadData(){
   verticalCardSwiperView.reloadData()
}

So I think you're better off searching for your problem on stackoverflow.

Hope this helps.

Best regards
Joni

edit: closing for now as not enough detail is provided and I don't feel like it's a bug with the library, feel free to reopen if you feel like it's still a problem with the library itself.