TapGesture Inside CollectionView Not Working After Adding SkeletonView
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 12.9k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
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.
- Setup SkeletonView for a collectionView with a custom cell for skeleton loading
- showAnimatedGradientSkeleton()
- 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:
Weird View when I hide the SkeletonView:
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with SkeletonView 1.30.4, a custom collection-view cell, showAnimatedGradientSkeleton(), and hideSkeleton() called from the network closure. Inspect the collection view's debug hierarchy when the unexpected view appears, then verify that hiding the skeleton restores tap-gesture behavior inside the cell.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, swift
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100