andreamazz / andreamazz/AMPopTip

PopTip does not show when calling show after hide

Offen
#204 7 Kommentare 2 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Swift
Sterne
3.3k
Forks
449
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

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.

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.