andreamazz / andreamazz/AMPopTip

PopTip does not show when calling show after hide

Aperta
#204 7 commenti 2 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Swift
Stelle
3.3k
Fork
449
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.