UnSwizzleLayoutSubviews should not have a delay.
Nobody has claimed this yet.
- Dominant language
- Swift
- Stars
- 12.9k
- Forks
- 1.1k
- PR merge metrics
- No merged PRs in 30d
Description
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.
https://github.com/Juanpe/SkeletonView/pull/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?
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?
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 with SkeletonViewCore/Sources/Internal/UIKitExtensions/UIView+Swizzling.swift at the linked line, and trace the delayed unSwizzle path relative to the skeletonDidDisappear notification and sk.isSkeletonActive. Confirm the desired ordering and whether the proposed delay removal or a completion callback is required; done means unSwizzle completion and notification state are consistent.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- swift
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100