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 |
Tags
- 클린 코드
- 애니메이션
- Refactoring
- Observable
- Protocol
- swiftUI
- HIG
- collectionview
- MVVM
- ribs
- UITextView
- swift documentation
- tableView
- Xcode
- SWIFT
- ios
- map
- Human interface guide
- UICollectionView
- combine
- RxCocoa
- rxswift
- clean architecture
- Clean Code
- 리팩토링
- 리펙터링
- uiscrollview
- uitableview
- 리펙토링
- 스위프트
Archives
- Today
- Total
목록변수 인라인하기 (1)
김종권의 iOS 앱 개발 알아가기
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bso8Sw/btr4l1mA6aA/7SOpGwkdKkAbhKyfqxTXn1/img.png)
리펙토링 핵심 각 방법들을 '왜' 수행해야 하는지 깨닫고 유연하게 적용하기 변수 추출하기 표현식이 너무 복잡한 경우, 따로 지역변수로 빼서 표현식을 쪼개어 관리하는 방법 표현식에 이름을 붙이는 것 반대 리펙토링: 변수 인라인하기 ex) 가격을 구하는 함수 getPrice(order:) 내부를 변수 추출하기 리펙토링 초기상태 struct Order { let quantity: Double let price: Double } let order = Order(quantity: 100, price: 3000) let price = getPrice(order: order) private func getPrice(order: Order) -> Double { // 가격 = 기본가격 + 배송비 - 할인 order.q..
Refactoring (리펙토링)
2023. 3. 18. 01:31