From the course: Code Clinic: Swift
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
View the existing files - Swift Tutorial
From the course: Code Clinic: Swift
View the existing files
- [Instructor] Let's take a look at our starting files before writing any additional code. I'm here in Main.storyboard and I have my chess board graphic laid out, and eight queen graphics. So I have right there Q1 through Q8. I have my solution label right here. The next solution button to cycle through them. And I just have the name of the app at the top which is not necessary if you're following along without the exercise files. Then I'll head over to ViewController.swift and here I have all of my outlets connected. And then I have an array of image views called queen. So that's going to be array of all of these queens. I have a variable called start position that represents the starting position of the first queen. That is the top left queen. The reason for that is I'm going to base the positioning when we position all the solutions based on that first queen there. So it's going to be based on the width and the height of the queen. So each one of these is a square that is just…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.