Juanpe / SkeletonView

☠️ An elegant way to show users that something is happening and also prepare them to which contents they are awaiting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

TapGesture Inside CollectionView Not Working After Adding SkeletonView

EmirhanKarahan opened this issue · comments

Description

I am using SkeletonView with my collectionView which shows users transportation cards. In every viewWillAppear method I'm showing SkeletonView with gradient animation, after network calls are done I hide the skeleton. In UI everything works fine but the tap gesture recognizer inside the actual collectionView cell is not clickable anymore.

  • I don't use didSelect method of collectionView for a reason, there is a huge clickable area with a atp gesture recognizer instead
  • When I put view.hideSkeleton( ) inside network call's function everything works fine. But It needs to be inside of my network call's closure.
  • I've found that there is a weird view when the problem happens. Please see attached screenshot.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

SkeletonView Environment:

SkeletonView version: 1.30.4
Xcode version: 14.2
Swift version: 5.7

Steps to reproduce:

Please replace this with the steps to reproduce the behavior.

  1. Setup SkeletonView for a collectionView with a custom cell for skeleton loading
  2. showAnimatedGradientSkeleton()
  3. hide it from a closure

Expected result

SkeletonView hides and you can click wherever you want

Actual result:

SkeletonView hides and but you can't click the view inside collection view. Recognizer function doesn't work at all.

Attachments:

Debug view hierarchy:

Working as excepted without SkeletonView:
Screenshot 2023-07-24 at 14 30 10

Weird View when I hide the SkeletonView:
Screenshot 2023-07-24 at 14 30 47

Ran into this too. As far as I can see, happens as soon as showAnimatedGradientSkeleton is called from within a cell class (regardless of whether the skeletonable view is even added to the view hierarchy or not).