Closed alexookah closed 3 years ago
Hi @alexookah, thanks for contributing.
IMHO, we should investigate why the app is crashing because of swizzling, but I agree with you that this could be a good solution meanwhile. I've checked the code, and I don't have anything to add :)
I'm going to merge it and release a new version, including this PR, to release this fix asap.
Thanks again :)
Thanks for your review @Juanpe.
In my case the app was not really crashing. it just was getting into an infinite loop of skeletonLayoutSubviews
when other layoutSubviews were run on the controller that had skeletonView enabled (like in iPad floating keyboard to normal)
At least this PL stops being notified from other layoutSubviews
.
I believe that the following tickets can be closed now: https://github.com/Juanpe/SkeletonView/issues/358 https://github.com/Juanpe/SkeletonView/issues/352 https://github.com/Juanpe/SkeletonView/issues/202
Yep, closed :)
Summary
Resolves #373 Resolves #358 Resolves #202 Resolves #352
This PR adds methods to
unSwizzleLayoutSubviews
&unSwizzleTraitCollectionDidChange
in order not to interfere with other controller methods when skeletonView is hidden. These methods are being called once if swizzle is enabled atrecursiveHideSkeleton
.Unswizzle is simple re-run with reverted selectors to stop swizzle.
My PL also includes a toolbar in textField to test whether an infinite loop exists when changing floating to normal keyboard (in iPad).
Let me know what you think.
Requirements (place an
x
in each of the[ ]
)