일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- map
- 리팩토링
- Clean Code
- 리펙토링
- combine
- Observable
- collectionview
- uitableview
- Xcode
- UITextView
- uiscrollview
- swiftUI
- tableView
- HIG
- MVVM
- 스위프트
- Protocol
- rxswift
- 애니메이션
- RxCocoa
- SWIFT
- 클린 코드
- ribs
- UICollectionView
- Refactoring
- ios
- 리펙터링
- Human interface guide
- clean architecture
- swift documentation
- Today
- Total
목록여백 (3)
김종권의 iOS 앱 개발 알아가기
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/QA097/btrXrNhzZxF/ZAVWURsSIY5HtSInPYEn0k/img.png)
UI 구현 시 주의할 점 최대한 constraint를 적게하고, UIKit에서 기본적으로 주어진 프로퍼티들을 이용하여 최대한 단순하게 만드는 것 constraint를 적게하는 이유: Commit Hitches가 줄어들어 UI 성능에 도움 (관련 글은 이전 포스팅 글 참고 추가적인 뷰 없이 내부적으로 있는 proprety를 이용하여 구현하면 뷰의 복잡도가 줄기 때문에 장황하지 않고 단순하게 구현이 가능 UIButton에 텍스트가 있는 버튼 위 UI는 UIButton한개로만 구현 다른 방법은, UIStackView + UIImageView + UILabel로 만들 수도 있지만 코드가 장황해지고, 타이틀을 눌렀을 때도 터치 반응을 해야하므로 gesture도 따로 등록해줘야 하는 번거로움이 있으므로 UIButt..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bLcgLr/btrLK6t528A/idtTHMcVC3NpZ7a0wqQzWK/img.png)
가장 일반적인 List 형태 List 하위에 NavigationLink가 있는 형태 import SwiftUI struct ContentView: View { var items = (0...100).map(String.init).map(SomeModel.init) var body: some View { NavigationView { List(items){ item in NavigationLink( destination: { Text(item.val) }, label: { Text(item.val) } ) } .navigationTitle("List 예제") } } } struct SomeModel: Identifiable { let val: String var id: String { val } } 오른쪽..
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/bKVqj4/btrdqjGmqkB/bUwWJFei6TqwbsXkgRUpkK/img.png)
스위프트에서의 layoutMagins 개념 현재 뷰의 경계와 content와의 여백 개념 혼동 주의: 현재 뷰 경계와 superview와의 여백이 아님을 주의 storyboard에서 layoutMargins 확인 방법 Editor > Canvas >Layout Rectangles layout 설정 시 "Constrain to margins" 옵션을 체크한 후 autolayout적용 시 view 내부에 margin값을 고려한 배치 cf) code에서 layoutMarginsGuide 주는 방법: layoutMarginsGuide. 으로 접근 imageView.leadingAnchor.constraint(equalTo: layoutMarginsGuide.leadingAnchor) 내부 label이 margi..