andreamazz / andreamazz/AMPopTip
PopTip does not show when calling show after hide
- Dominant language
- Swift
- Stars
- 3.3k
- Forks
- 449
- PR merge metrics
- No merged PRs in 30d
Description
Scenario: If a PopTip is visible and we hide that Poptip and show another Poptip in the same callstack, the second Poptip is not visible.
Severity: This is important in cases where the code is such that hide and show is called from multiple places and a scenario happens when hide and show are called from the same call stack.
This happens because in the completion block for hide PopTip, its views are removed from the hierarchy. When removeAllAnimations is called, this completion block is not called immediately, but after a slight delay. In the mean time if we call show on PopTip, it adds the views in the view hierarchy and completion block for the previous hide is called after sometime removing the view from the view hierarchy.
Fix: in the completion block for animation, we should check if the animation finished and only then remove the views from the hierarchy. And when we are calling removeAllAnimations, we should ensure that the view is removed from the view hierarchy.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.