> For the complete documentation index, see [llms.txt](https://ios-course.cornellappdev.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ios-course.cornellappdev.com/course-content/week-2-or-uikit-mvc-and-control/monday-or-uikit.md).

# Monday | UIKit

<details>

<summary>Classes Demo Code</summary>

```swift
class Student {
    // Properties
    var name: String
    var major: String
    var age: Int

    // Initializer
    init(name: String, major: String, age: Int) {
        self.name = name
        self.major = major
        self.age = age
    }
}

// Creating an instance of Student
let jay = Student(name: "Jay", major: "CS", age: 67)
// Access properties like below
jay.name
jay.major
jay.age

// NOTE: the super class of `EngineeringStudent` is `Student`
class EngineeringStudent: Student {
    // Inherits all properties and function from 'Student'
    // Define more properties
    var doesShower: Bool

    init(name:String, major:String, age: Int, doesShower: Bool) {
        self.doesShower = doesShower // Initalize property specific to this class
        super.init(name: name, major: major, age: age) // Call the super class's initializer
    }
}

// Creating an instance of EngineeringStudent
let asen = EngineeringStudent(name: "Asen", major: "CS", age: 22, doesShower: false)
asen.doesShower // This works fine since asen is an EngineeringStudent
jay.doesShower  // This DOESN'T work since jay is a Student. `doesShower` 
                //    is a property of EngineeringStudent but not Student
```

</details>

<details>

<summary>UIKit Follow-Along</summary>

{% embed url="<https://github.com/intro-to-ios/lec2-uikit>" %}
If you prefer to download the ZIP, go to Code > Download ZIP in the Github Repository website.
{% endembed %}

## Using git in Terminal

#### 1. Clone the Repository

<pre class="language-sh"><code class="lang-sh"><strong>git clone https://github.com/intro-to-ios/lec2-uikit
</strong></code></pre>

#### 2. Checkout Branches

* **If you fall behind during demo**
  * **restore** using "git restore ."&#x20;
    * or stash using "git stash"
  * then checkout a completed code to start the next demo

```zsh
## Completed UI Label Code
git checkout 1-uilabel
```

```zsh
## Completed UIImageView Code
git checkout 2-uiimageview
```

</details>

### Lecture Slides

{% embed url="<https://docs.google.com/presentation/d/1hfOS2ko47X6RBvBHj7pUiCPKQtwjQBRwtKTQtitcn04/edit?usp=sharing>" %}

### Spring 2026 Lecture Video

{% embed url="<https://www.youtube.com/watch?list=PLjf6nsEcF5KN3xI48VwrmWMPmlmuAxU2x&v=Iu_1z976niU>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ios-course.cornellappdev.com/course-content/week-2-or-uikit-mvc-and-control/monday-or-uikit.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
