카테고리 없음

ios 프로그래밍 2강

journal9205 2024. 9. 11. 21:41

python, javascript

스크립트 언어

 

swift 

컴파일언어, 

 

LLVM 이용

알아서 최적화 해줌

 

 

c > c++ > object c > swift > python

 

repl

https://swiftfiddle.com

 

import Foundation
let hello = "Hello SMU"
print(hello)

int a

 

object, function

protocol

 

vs ->

ide, edition, profiler, debugger

각자의 차이가 뭐임?

 

vs code ->

edition

 

 

학습에 집중

profiler,

 

project

help

 

import Foundation

struct Note {
    let id = UUID()
    var content: String
}

class NotesViewModel {
    var notes: [Note] = []
    
    func addNote(content: String) {
        let newNote = Note(content: content)
        notes.append(newNote)
    }
    
    func listNotes() {
        for note in notes {
            print(note.content)
        }
    }
}

let viewModel = NotesViewModel()

viewModel.addNote(content: "First note!")
viewModel.addNote(content: "Second note!")

viewModel.listNotes()

 

디버깅

 

show quick help

 

자료형, 열거형