iOS & Swift The Complete iOS App Development BootCamp
β’
55μκ° μ§λ¦¬ κ°μ!!
β’
μ΅λ 15μΌμμ λ½κ°κΈ°!
Section 1. Getting Start with iOS Development and Swift 5
< κ°μ μλ£λ€ >
< λλν μ©λμ νμ >
Section 2. Xcode Storyboards and Interface Builder
Xcode Storyboardλ₯Ό νμ©νμ¬ κ°λ¨νκ² μ΄ν리μΌμ΄μ
μ λμμΈν΄λ³΄μ.
1. κ°λ¨νμ§λ§ μ μ©ν λ¨μΆν€ μ 리
β’
cmd shift y : debug box
β’
cmd - , cmd + : κΈμ ν¬κΈ° μΆμ, ν¬κ²
2. I am Rich μ± λ§λ€κΈ°!!
μ°μ Projectλ₯Ό μμ±ν λ Swift UIκ° μλ Storyboardλ₯Ό μ ννλ€.
Organization Identifier : identify your app uniquely on the AppStore
μ€ν 리보λλ₯Ό μμ±νλ©΄ μ€λ₯Έμͺ½κ³Ό κ°μ νλ©΄μ΄ μκΈ΄λ€!
μΌμͺ½μ λ€λΉκ²μ΄μ
λ°μ Main.storyboardκ° μκΈ΄ κ²μ νμΈν μ μλ€.
finder μμ .xcodeproj νμΌλ‘ νλ‘μ νΈλ₯Ό μ΄ μ μλ€.
β’
xcode ꡬ경νκΈ°
β¦
νλ‘μ νΈ μ΄λ¦ λλ₯΄λ©΄ general tab μ κ° μ μλ€.
βͺ
μ΅μ support νκ²(iOS)μ μ ν μ μλ€.
βͺ
Device Orientation
βͺ
Status Bar Style
β¦
swift : μ½λ νμΌ, storyboard νμΌ : design νμΌ
μ°μΈ‘ν¨λ μμ +λ₯Ό λλ₯΄λ©΄ μνλ κΈ°λ₯λ€μ μΆκ°ν μ μλ€.
λ£κ³ μΆμ μμλ₯Ό μ ν ν Drag and Dropμ ν΅ν΄ νλ©΄ μλ‘ λμ΄μ€λ©΄ λλ€.
μ€λ₯Έμͺ½ λ€λΉκ²μ΄μ
μμ μλ μμ΄μ½(attribute inspecter)μΌλ‘ ν΄λλ©΄, μ νν μ»΄ν¬λνΈμμ λ€μνκ±Έ μμ ν μ μλ€.
μλμ μμ΄μ½(size inspecter)μ λλ₯΄λ©΄, ν¬κΈ°, μμΉλ₯Ό μ‘°μ ν μ μλ€.
μ»΄ν¬λνΈλ€μ΄ 리μ€νΈ λλκ³³ + layer λΌκ³ μκ°νλ©΄ λ¨
μ€μ μ±μμ 보μ΄λ νλ©΄ λ€μνκ² κ³¨λΌ νμΈκ°λ₯
image/iconμ μ¬μ΄μ¦λ³λ‘ νΈνκ² λ§λ€μ΄μ£Όλ μ¬μ΄νΈ
κ°λ¨νκ² icon λμμΈ κ³ νμ§λ‘ λ§λ€μ΄λ³΄κΈ°
Flowchart
μμ΄ν°μμ ν μ€νΈνκΈ°!
β’
simulator
β’
physical iphone
β’
physical iphone with wifi (but λλ¦Ό)
Section 3. Xcode Storyboard and Interface Builder Challenge
Make the I Am Poor App!
Section 4. Swift programming Basics - Collections, Constants & Variables
Clone an existing Xcode project from Github
μ°μ μ΄λ―Έ λ§λ€μ΄μ Έ μλ Xcode projectλ₯Ό ν΄λ‘ νλ€.
$ git clone https://github.com/appbrewery/Dicee-iOS13
Shell
볡μ¬
μ€νμμ€ iOS Apps. λ€μν μ±λ€ μ€νν΄λ³΄μ
Design the user interface
μ°μΈ‘ ν¨λμ μ¬μ©ν΄μ κ°λ¨νκ² λμμΈ ν μ μλ€.
Changing UI Elements programmatically
dot ν¨μμ¬μ©!
[κ°μ²΄μ΄λ¦].image
Swift
볡μ¬
μ½λμμμ Assetμ μ΄λ―Έμ§ μ κ·ΌνκΈ°
Image Literal
Swift
볡μ¬
μ€λ₯Έμͺ½μ²λΌ μ΄λ―Έμ§κ° μκΈ°λ©΄ λλΈν΄λ¦! μ΄ν μνλ μ΄λ―Έμ§λ₯Ό κ³ λ₯΄λ©΄ λλ€.
Detect user interaction and respond to it
μ΄μ roll λ²νΌμ κΈ°λ₯μ λ£μ΄λ³΄μ
Eventμ λ€μν κΈ°λ₯λ€μ μ΄νμ μμ보μ.
Touch Up Insideλ 'λ²νΌ ν
λ리 μμμ touch λμμ΄ μΌμ΄λ¬μ λ'λΌλ μλ―Έμ΄λ€.
μ΄μ λ²νΌμ λ£κ³ λλ©΄ μλμ κ°μ μ½λκ° μμ±λλ€.
@IBAction func rollButtonPressed(_ sender: UIButton) {
// what to do
}
Swift
볡μ¬
β’
File β New β Playground μμ Swift μ°μ΅ κ°λ₯!
Learn to use Swift Variables and Arays to store data
β swift dive
Naming Conventions
- camelCase β Swift!
- kebab-case
- snake_case
Learn about randomisation in Swift
Int.random(in: 0...5)
Swift
볡μ¬
λλ€ μ£Όμ¬μ μ΄ν λ§λ€κΈ°
import UIKit
class ViewController: UIViewController {
// IBOutlet allows me to reference a UI element
@IBOutlet weak var diceImageView1: UIImageView!
@IBOutlet weak var diceImageView2: UIImageView!
// var leftDiceNumber = 1
// var rightDiceNumber = 5
override func viewDidLoad() {
super.viewDidLoad()
//WHO WHT VALUE
diceImageView1.image = #imageLiteral(resourceName: "DiceSix")
diceImageView2.image = #imageLiteral(resourceName: "DiceTwo")
// diceImageView1.alpha = 0.5
}
@IBAction func rollButtonPressed(_ sender: UIButton) {
diceImageView1.image = [ #imageLiteral(resourceName: "DiceOne"), #imageLiteral(resourceName: "DiceTwo"), #imageLiteral(resourceName: "DiceThree"), #imageLiteral(resourceName: "DiceFour"), #imageLiteral(resourceName: "DiceFive"), #imageLiteral(resourceName: "DiceSix") ][Int.random(in: 0...5)]
diceImageView2.image = [ #imageLiteral(resourceName: "DiceOne"), #imageLiteral(resourceName: "DiceTwo"), #imageLiteral(resourceName: "DiceThree"), #imageLiteral(resourceName: "DiceFour"), #imageLiteral(resourceName: "DiceFive"), #imageLiteral(resourceName: "DiceSix") ][Int.random(in: 0...5)]
// leftDiceNumber += 1
// rightDiceNumber -= 1
}
}
Swift
볡μ¬
λ°°μ΄μ κ²½μ° μλμ κ°μ΄ μ¬μ© κ°λ₯
diceImageView1.image = diceArray.randomElement()
diceImageView2.image = diceArray[Int.random(in: 0...5)]
Swift
볡μ¬
λ
Έλμ : warning
λΉ¨κ°μ : error
Section 5. Swift Programming Basics Challenge
λλ€μ νμ©ν μ΄ν리μΌμ΄μ
λ§λ€κΈ°!
λ©μ²νκ² rm -rfλ‘ μ§μλ²λ Έλ€.. (.gitμ μ§μ΄λ€λ κ±Έ...)
Section 6. Auto Layout and Responsive UIs
Size Classes and orientation
Understand Constraints
Learn about Alignment and Pinning
Use Containers for more fine grained control
Learn about StackViews
Section 7. Using and Understanding Apple Documentation
setup the Skeleton Project
Figure out how to play sound using Apple Documentation and Stack Overflow
Learn about Swift Functions
ν¨μμ λν κΈ°λ³Έ μ§μλ€ β μΌλ°μ μΈ νλ‘κ·Έλλ° μΈμ΄λ λμΌ
Linking multiple elements to one IBAction
Creating functions with inputs
Section 8. Intermediate Swift Programming - Control Flow and Optionals
Autoshrinkλ₯Ό ν΅ν΄μ μλμΌλ‘ View μ¬μ΄μ¦μ λ§λ Minimum Font Sizeλ₯Ό μ§μ ν΄μ€λ€!
Float vs Double
Floatμ Double, Swiftμμλ μ€μ νμ
μ μλ£νμ μ¬μ©ν λ, λ μ€ μ΄λ€ κ²μ μ¬μ©ν κΉ?
Swift Docsμμλ μλμ κ°μ κ°μ΄λλ₯Ό μ 곡νλ€
Double has a precision of at least 15 decimal digits, whereas the precision of Float can be as little as 6 decimal digits. The appropriate floating-point type to use depends on the nature and range of values you need to work with in your code. In situations where either type would be appropriate, Double is preferred.
μ°μ Double μλ£νμ μμμ μ΄ν 15μ리μ μ λ°λλ₯Ό κ°μ§κ³ , Float μλ£νμ μμμ μ΄ν 6μ리μ μ λ°λλ₯Ό κ°μ§λ€. μμ
ν κ°μ νΉμ±μ λ°λΌ μ λΉν μλ£νμ μ ννμ¬ μ¬μ©νλ©΄ λλ€.
νμ§λ§ λ μλ£ν λͺ¨λ μ¬μ©κ°λ₯ν μν©μμλ Doubleμλ£νμ μ νΈνλ€κ³ λμ΄μλ€.
Progress Viewμ κ°μ΄ Floatν μλ£ν μ¬μ©μ΄ Fixλ κ²½μ°κ° μλλΌλ©΄, μΌλ°μ μΈ λ³μμμλ Double μλ£νμ μ°λ κ²μ΄ μ’μ보μΈλ€.
Section 9. iOS App Design Patterns and Code Structuring
Show quiz questions
let quiz = [
"Four + Two is equal to Six.",
"Five - Three is equal to Six.",
"Three + Eight is equal to Eleven."
]
var questionNumber = 0
override func viewDidLoad() {
super.viewDidLoad()
updateUI()
}
@IBAction func answerButtonPressed(_ sender: UIButton) {
questionNumber += 1
updateUI()
}
func updateUI() {
questionLabel.text = quiz[questionNumber]
}
Swift
볡μ¬
Check the answers
2μ°¨μ λ°°μ΄μ νμ©νμ
var arr = [["text", bool],["text", bool],["text", bool]]
Swift
볡μ¬
Learn about Swift Structures
β in Swift Deep Dive
Learn about design patterns and use the Model View Controller pattern
What is Design Pattern?
A proven solution to a common problem
The MVC Pattern
Model-View-Controller
β’
Model
β Data & Login
β’
View
β User Interface
β’
Controller
β Mediator
View μ Modelμ μ λ μ§μ μ μΌλ‘ ν΅μ νμ§ μλλ€. νμ Controllerλ₯Ό κ±°μ³μ!!
Learn about Swift Functions that can have outputs
Understand immutability
Section 10. iOS App Design Pattern Challenge
MVC Pattern App Challenge
Section 11. Advanced Swift Programming - Classes, Ingeritance & Advanced Optionals
Learn to use UISliders.
@IBAction func hegithSlider(_ sender: UISlider) {
print(String(format: "%.2f", sender.value))
heightLabel.text = String(format: "%.2f", sender.value) + "m"
}
@IBAction func weightSlider(_ sender: UISlider) {
print(Int(sender.value))
weightLabel.text = String(format: "%.0f", sender.value) + "Kg"
}
C
볡μ¬





















