O'Reilly logo

Mastering iOS 11 Programming - Second Edition by Donny Wals

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Making sure the UI updates as expected

We're going to write two tests to make sure that our trivia game works as expected. The first test will test that the question and answer buttons appear and that they have the correct labels. The second test will make sure that we can tap the answers and that the UI updates accordingly.

Instead of recording the tests, we're going to write them manually. Writing tests manually gives you a bit more control and allows you to do much more than just tapping on elements. Before we do this, you should open the Main.storyboard file and give accessibility identifiers to the UI elements. Select the question title and give the UILabel an identifier of QuestionTitle. Select each of the answers and give them the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required