Can I disable animation for Xcode-UI-Tests?
Asked Answered
D

1

28

I am using Xcode7 to write UITest, the problem is I need to wait for all the steps to happen before I validate the actual result. This takes a lot of time with all with view controller pushing/presenting/dimissing.

Is there a way through which I can disable the animation while writing the test?

Dejection answered 25/9, 2015 at 1:1 Comment(0)
D
32

You can disable animations for the entire app with:

[UIView setAnimationsEnabled:NO];

This will carry over to running your UI Tests as well. Note that this must be called from the application code, not the tests.

Dishpan answered 25/9, 2015 at 1:42 Comment(1)
What about SwiftUI?Cellobiose

© 2022 - 2024 — McMap. All rights reserved.