You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use the isAnimating category method, defined in UIView+ShelleyExtensions.m to check that nothing is animating before interacting (e.g. tapping). I'm using the Igor query engine and some custom code but I believe Frank has a similar Cucumber step/helper method that uses this too.
As of iOS7, it is possible for certain elements to be "animating" without actually moving if they have some kind of motion effect attached to them. In my particular, action sheets and alerts have a parallax effect applied to them (using the private _UIParallaxMotionEffect class).
There are several ways around this; one would be to discount the above motion effect (or all motion effects) although that probably leaves open edge cases. Any suggestions here?
The text was updated successfully, but these errors were encountered:
Here's the workaround I'm currently using (as I'm not using Shelley, I've copied the category methods into my app's source). Like I say, it's not foolproof, but it does fix my particular issue.
- (BOOL)isAnimating
{
if (self.layer.animationKeys.count == 1) {
// it is possible for the only animation to be attached to a view to be// a parallax effect (e.g. alerts and action sheets). We can probably// safely discount them.if (self.motionEffects.count == 1 && [self.motionEffects[0] isKindOfClass:NSClassFromString(@"_UIParallaxMotionEffect")]) {
returnNO;
}
}
return self.layer.animationKeys.count > 0;
}
I use the isAnimating category method, defined in
UIView+ShelleyExtensions.m
to check that nothing is animating before interacting (e.g. tapping). I'm using the Igor query engine and some custom code but I believe Frank has a similar Cucumber step/helper method that uses this too.As of iOS7, it is possible for certain elements to be "animating" without actually moving if they have some kind of motion effect attached to them. In my particular, action sheets and alerts have a parallax effect applied to them (using the private
_UIParallaxMotionEffect
class).There are several ways around this; one would be to discount the above motion effect (or all motion effects) although that probably leaves open edge cases. Any suggestions here?
The text was updated successfully, but these errors were encountered: