Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 |
Tags
- rxswift
- collectionview
- ios
- RxCocoa
- Observable
- Clean Code
- 스위프트
- swift documentation
- Human interface guide
- tableView
- swiftUI
- uitableview
- Refactoring
- clean architecture
- Xcode
- 리펙토링
- map
- SWIFT
- uiscrollview
- HIG
- Protocol
- UITextView
- ribs
- 리펙터링
- MVVM
- UICollectionView
- combine
- 애니메이션
- 리팩토링
- 클린 코드
Archives
- Today
- Total
목록2024/02/06 (1)
김종권의 iOS 앱 개발 알아가기
[iOS - swift] Type casting 표현식
Type casting 일반적인 표현 String -> Double 가장 일반적인 방법 Double에 문자열을 집어넣는 방법 Double("1") 또는 extension String에 넣는 방법 extension String { var asDouble: Double? { Double(self) } } "1".asDouble Type casting 표현식 표현식을 정의해놓는 방법 let stringToDouble = Double.init as (String) -> Double? 동작 1) 인수가 (String)으로 삽입 2) 인수가 Double.init에 들어감 - Double(인수)형태로 초기화 3) 그 값을 리턴 print(stringToDouble("a")) // Optiona(nil) print(s..
iOS 응용 (swift)
2024. 2. 6. 01:22