August 2016
Intermediate to advanced
1027 pages
23h 11m
English
Let's start implementing the first view, in which we can select the level of the game.
As we have planned to implement all of the UI in the code itself, we won't bother to touch the storyboard. We will proceed to open the View Controller class in order to implement the menu screen.
From the mockup, we can observe that there are three difficulty levels, each represented by a horizontally centered and vertically equidistant button.
First of all, we will define an enumeration to describe the difficulty.
Then, we implement the setup for the layout:
enum Difficulty {
case Easy, Medium, Hard
}This enum must be defined outside the class so that it will be accessible by all classes.
Just for the sake of readability, ...
Read now
Unlock full access