Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Nested Collection view becomes unresponsive in iOS 14 when using SkeletonView. #331

Open
Manikandan271192 opened this issue Sep 17, 2020 · 9 comments
Assignees

Comments

@Manikandan271192
Copy link

I am using SkeletonView version 1.8 and it was working fine in iOS 13(Xcode 11.7). When I run this to iOS 14 with Xcode 12 the nested collection views have become unresponsive after calling

self.showAnimatedGradientSkeleton(usingGradient: gradient, animation: animation, transition: .crossDissolve(0.25)) Method.

@Juanpe Juanpe added the iOS 14 label Sep 17, 2020
@helkarli
Copy link

helkarli commented Sep 17, 2020

I have a similar issue. Using SkeletonView 1.8.7 makes a collection view within a collection view cell (therefore nested) unresponsive (no horizontal scrolling or taps recognized), although the SkeletonView is used in a different view controller in a different tab. 🤷‍♀️

@Juanpe Juanpe self-assigned this Sep 17, 2020
@Juanpe
Copy link
Owner

Juanpe commented Sep 17, 2020

Ok, we need to investigate deeper

@helkarli
Copy link

The only thing I meanwhile discovered was that the call to swizzleLayoutSubviews() disables the user interaction in my cell...without it, as far as I can see now, everything in our setup still works. Animated as well as non-animated.

@helkarli
Copy link

After some more investigation and considering reworking my views I discovered that I was adding the nested collectionView to the cell view instead of the contentView of the cell, which is not supposed to work at all, but does until the swizzled layoutSubviews of SkeletonView changes something. Sorry for the fuzz... :)

@RuiAAPeres
Copy link

I am seeing the same happening on my setup. Two CollectionViews nested. The outer CollectionView is not supposed to animate, but the inner is.

@alexookah alexookah mentioned this issue Apr 7, 2021
2 tasks
@tsangaris
Copy link

tsangaris commented Apr 9, 2021

After some more investigation and considering reworking my views I discovered that I was adding the nested collectionView to the cell view instead of the contentView of the cell, which is not supposed to work at all, but does until the swizzled layoutSubviews of SkeletonView changes something. Sorry for the fuzz... :)

Same here!

So in your UICollectionViewCell instead of self.addSubview(someOtherView) [or addSubview(someOtherView)] you should do contentView.addSubview(someOtherView).

This StackOverflow post https://stackoverflow.com/questions/63947042/since-updating-to-xcode-12-i-am-not-able-to-place-any-uicontrol-inside-uitablevi highlights this.

@jowinst
Copy link

jowinst commented Apr 15, 2022

Super useful! Thank you all for your comments, solved here too ✅

@joaopedro96
Copy link

After some more investigation and considering reworking my views I discovered that I was adding the nested collectionView to the cell view instead of the contentView of the cell, which is not supposed to work at all, but does until the swizzled layoutSubviews of SkeletonView changes something. Sorry for the fuzz... :)

68747470733a2f2f6d65646961312e67697068792e636f6d2f6d656469612f765839576343695777554637472f3230302e676966

I spent at least 6 hours trying to figure it out why my collection view wasnt working after calling showSkeleton() and im sure that i would spend a lot more until realize about contentView in my cell... dude you just saved my life i was totally going crazy here, you solved my problem THANK YOU YOUNG MASTER OF COLLECTION VIEWS

@helkarli
Copy link

@joaopedro96 I am glad my error was of service to you. 🙂 Your's truly, dudette and mistress of collection views.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants