Introduction

Details

This slide deck is based on Dr. Si Chen’s slides

Planning

Getting Started with App Development

History of Swift
Pros and Cons of Swift
Pros
Cons
Apps built using Swift
Swift language features

Coding in Swift

Hello World
Terminal and Swift REPL
License
1
sudo xcodebuild -license
1
swift repl
User Interface design in Swift
Model-View-Controller

Coding Swift: Xcode IDE

Getting started
First project
Create a new Xcode project
Choose the following options for your project
Swift IDE
Run the project
Default home screen
App launched

“Modify/build your first app”

App Icon
AppIcon
Local storage

The icon pictures will show up inside your app’s local directory.

New Icon!

Rerun the simulator and observe the new icon

Buttons and Images
Clickable button
ContentView: View

swift linenums="1" --8<-- "docs/csc496/lectures/codes/01-intro/button.swift"

More details …
More images in Assets
ContentView: View
1
--8<-- "docs/csc496/lectures/codes/01-intro/images.swift"