kif-framework/KIF — pull request #533 by Sipeso (2014-12-22 09:08:40+00:00)
Title: improves the stability of the testWaitForFinishingAnimation-test on iOS ...

It may occur that a transition-animation (like a push-on-navigationcontroller-animation) may already be finished (= none of the CALayers has animations), but in fact, the view-hierarchy still contains all views that were shown before the transition started and the views that were shown when the transition is finished. In this state, doing a tap by calling tapScreenAtPoint: to, i.e. trigger a gesture-recognizer on a view at a certain point, may fail as the routine in tapScreenAtPoint: can't find the right view to send the tap within this in-between-transition-animation-state-view-hierarchy.
An indicator of this state is the existence of a _UIParallaxDimmingView-instance within the view-hierarchy, so if one of them is found, i assume that there is an unfinished animation and wait until it disappeared.

Here is an example of such a view-hierarchy (it is taken from a run of testWaitForFinishingAnimation)
```

|
| |
| | |
| | | | <---- This is the root-view of the previous viewcontroller
| | | | |
| | | | | |
| | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | |
| | | | | | |
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
| | | | | |
| | | | | | | <_UITextFieldRoundedRectBackgroundViewNeue>
| | | | | | |
| | | | | |
| | | | | | |
| | | | | | |
| | | | | |
| | | | | |
| | | | | | | <_UISwitchInternalViewNeueStyle1>
| | | | | | | |
| | | | | | | | |
| | | | | | | |
| | | | | | | | |
| | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | |
| | | | | |
| | | | | | |
| | | | | | |
| | | | | |
| | | | | | | <_UITextFieldRoundedRectBackgroundViewNeue>
| | | | | |
| | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | |
| | | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
| | | | | | |
| | | | | |
| | | | | |
| | | | <_UIParallaxDimmingView>
| | | |
| | | | | <_UIParallaxDimmingView>
| | | | | |
| | | | | | <---- This is the root-view of the pushed viewcontroller
| | | | | | |
| |
| | | <_UINavigationBarBackground>
| | | |
| | |
| | | |
| | | <_UINavigationBarBackIndicatorView>
```