How can I test a specific screen in my application without running the entire hierarchy until

Suppose you are developing Settings.app (the iPhone settings application) and want to add features to the text replacement system.

To check this screen, you need to go through all the screens Settings > General > Keyboard > Text replacement, which is very painful if you do it often.

What options can I directly test on the Replace Text screen? Or, alternatively, quickly jump to a specific screen?

Keep in mind that we usually set things on the previous screens: state, singleton, global variables, etc.

I don’t know the magic way to do this. Then I would like to know what your tricks and tips are (you use different schemes: do you arrange your status code in such a way that it is easier to test the screen?)

+4
source share
4 answers

For this purpose you can use checkboards initialViewController . In Storyboard -> ViewController, check the property named initialViewController. By enabling this, you will immediately go to this particular screen. Please ignore if this is not your requirement.

+1
source

, , rootViewcontroller

0

, . , , , , . , , - , . , , , .

0

if you use the Select Viewcontroller storyboard that you want to test, and in the storyboard, select the initialViewController check box for this purpose, so it will start as your first screen, so without going to all the other screens, you can check the initialViewController check box .

enter image description here

0
source

Source: https://habr.com/ru/post/1664150/


All Articles