[Swift 5.7] if let shorthand
안녕하세요 :) Zedd입니다. Swift 5.7 변경사항 중 하나인 if let shorthand를 보려고 합니다. if let foo = foo { .. } 를 사용하여 기존 optional variable를 "숨기는" optional binding은 굉장히 일반적인 패턴인데요. if let foo = foo 같이 식별자를 두번 써줘야해서 let someLengthyVariableName: Foo? = ... let anotherImportantVariable: Bar? = ... if let someLengthyVariableName = someLengthyVariableName, let anotherImportantVariable = anotherImportantVariable { ... } 이렇..
Swift
2022. 7. 9. 17:04
TAG
- actor
- WKWebView
- Git
- 스위프트
- 회고
- 스위프트 문법
- IOS
- swift array
- Combine
- WWDC
- FLUTTER
- SwiftUI
- swift 공부
- swift3
- ios 13
- Swift
- fastlane
- iOS delegate
- Xcode
- swift delegate
- 제이슨 파싱
- Accessibility
- np-hard
- swift tutorial
- 피아노
- UIBezierPath
- np-complete
- swift sort
- WidgetKit
- github
글 보관함
반응형
- Total
- Today
- Yesterday