-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
UnSwizzleLayoutSubviews should not have a delay. #490
Comments
Added a MR to remove the async delay for unSwizzle methods |
I was thinking, maybe the async+delay should also be removed from the swizzle methods in case the hideSkeletonView is run immediately after showSkeletonView |
Hello, I have a sample to reproduce the issue here: #495 |
When Skeleton is active and you try to show a floating keyboard it will produce infinite loop. In order to avoid this and you want to show keyboard do it after stopping the skeleton Animation with a delay 0.02 seconds. (work-around) |
I know that it produce an infinite loop, that's why I've opened the issue :) |
Hello,
I happened to have another infinite loop issue with swizzle methods. I remember I had fixed this in the past with adding the unSwizzle methods.
#381
In order to fix my new issue which was trying to show a floatingKeyboard right after hidingSkeletonView. I think that the unSwizzle method occurs too late.
The swizzle delay 0.01 maybe makes sense to me but not the unSwizzle delay. Also does unSwizzle really need to be in async method?
https://github.com/Juanpe/SkeletonView/blob/main/SkeletonViewCore/Sources/Internal/UIKitExtensions/UIView%2BSwizzling.swift#L44
When receiving the notification with skeletonDidDisappear the swizzle methods are still active (due to the delay 0.01). It should be triggerred after the unswizzle are completed.
The
sk.isSkeletonActive
should return false only when the unSwizzle method is disabled in my opinion.Should I make a MR that removes the delay for unSwizzle methods?
I was also thinking about some delegate about the didDisappear or some callback that runs after the unswizzle is triggered. Do you like that idea?
The text was updated successfully, but these errors were encountered: