How to correctly configure a UI component in tests if you need to wait for the life cycle #980
Unanswered
Ernest0-Production
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem
I have a
UIViewController
which initial setup happens inviewDIdLoad
,viewWillAppear
,viewDidAppear
.If I start accessing properties of my UI component to configure it before the screen is shown in
UIWindow
, in some cases the screenshot may be incorrect, since the behavior is different from how everything works in the production code.It is important for me to keep the order (of the life cycle) and perform actions only after that.
Discussion
Would it be correct in this case to write a helper for subscribing to the component lifecycle (in the form of clojures) and make component settings in these clojures?
Does anyone use this approach or am I moving in the wrong direction?
Beta Was this translation helpful? Give feedback.
All reactions