티스토리

heeble_e
검색하기

블로그 홈

heeble_e

heeble.io/m

heeble 님의 블로그입니다.

구독자
0
방명록 방문하기

주요 글 목록

  • [Swift] 공식 문서 요약 - The Basics_04 본 내용은 Swift 공식 문서에 기반하여 작성되었습니다. https://docs.swift.org/swift-book/LanguageGuide/TheBasics.html Error Handling 프로그램 실행 시 혹시나 발생할 수 있는 에러에 대한 처리 func canThrowAnError() throws { // this fuction may or may not throw an error } // 이 함수는 아래와 같이 do-try-catch 를 통해 사용하면 특정 Error에 대해 처리할 수 있다. do { try canThrowAnError() // no error was thrown } catch { // an error was thrown } [예시] func makeASandwich() t.. 공감수 0 댓글수 0 2023. 9. 13.
  • [Swift] 공식 문서 요약 - The Basics_03 본 내용은 Swift 공식 문서에 기반하여 작성되었습니다. https://docs.swift.org/swift-book/LanguageGuide/TheBasics.html Optional [옵셔널] '값이 없을 수 있는 상황'에서 사용. let possibleNumber = "123" let convertedNumber = Int(possibleNumber) // "123"은 Int로 변경 가능하나 "Hello, World"의 경우 Int로 변경 불가능 // 즉, 모든 String을 Int로 변경 가능하지 않음 -> return optional Int nil [닐] optional 변수에서 값이 없을 때를 표현 var serverResponseCode: Int? = 404 // serverResponse.. 공감수 0 댓글수 0 2023. 9. 13.
  • [Swift] 공식 문서 요약 - The Basics_02 본 내용은 Swift 공식 문서에 기반하여 작성되었습니다. https://docs.swift.org/swift-book/LanguageGuide/TheBasics.html Integers [정수] 부분 표현이 아닌 수. 부호가 있거나 (양수, 0, 음수) 없는(양수, 0) 수를 포함 // 부호가 없는 정수 유형 : 8-bit , 부호가 있는 정수 유형 : 32-bit // 각 유형에 별도의 이름이 존재한다 (Int8, Int32 등) let minValue = UInt8.min // minValue is equal to 0, and is of type UInt8 let maxValue = UInt8.max // maxValue is equal to 255, and is of type UInt8 // 각 .. 공감수 0 댓글수 0 2023. 9. 13.
  • [Swift] 공식 문서 요약 - The Basics_01 본 내용은 Swift 공식 문서에 기반하여 작성되었습니다. https://docs.swift.org/swift-book/LanguageGuide/TheBasics.html The Basics — The Swift Programming Language (Swift 5.3) The Basics Swift is a new programming language for iOS, macOS, watchOS, and tvOS app development. Nonetheless, many parts of Swift will be familiar from your experience of developing in C and Objective-C. Swift provides its own versions of all fu.. 공감수 0 댓글수 0 2023. 9. 13.
    문의안내
    • 티스토리
    • 로그인
    • 고객센터

    티스토리는 카카오에서 사랑을 담아 만듭니다.

    © Kakao Corp.