일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- ios
- combine
- tableView
- 리팩토링
- ribs
- Human interface guide
- UICollectionView
- collectionview
- 클린 코드
- HIG
- MVVM
- 애니메이션
- 스위프트
- 리펙토링
- uitableview
- Clean Code
- Xcode
- Observable
- uiscrollview
- 리펙터링
- clean architecture
- Protocol
- RxCocoa
- Refactoring
- swiftUI
- rxswift
- swift documentation
- SWIFT
- map
- UITextView
- Today
- Total
목록SWIFT (948)
김종권의 iOS 앱 개발 알아가기
1. collectionView 개념 2. collectionView 구현, custom cell 3. collectionView 레이아웃 개념 (UICollectionViewFlowLayout) programmtically CollectionView 구현 참고: https://ios-development.tistory.com/624 xib사용하여 CollectionView 구현 CollectionView 추가 -> 구분을 위해 CollectionView와 Cell 배경 색상 세팅 Cell의 Identifier 설정 CollectionView의 DataSource 정의 collectionView @IBOutlet 설정 tableView와 동일하게 DataSource에서 numberOfItemsInSect..
1. collectionView 개념 2. collectionView 구현, custom cell 3. collectionView 레이아웃 (UICollectionViewFlowLayout) CollectionView의 개념 CollectionView와 TableView의 차이점 CollectionView는 cell이 grid형태 CollectionView는 UICollectionViewLayout이라해서 cell 레이아웃 설정하는 부분이 따로 존재 tableView에서의 "row"라는 용어가 "Item"으로 사용 CollectionView와 TableView의 공통점 Section과 Cell이 존재하고 dataSource를 가지고 데이터처리와 UI 처리가 분리되어 있는 구조 TableView와 동일하게..
초기 info.plist 위치 AppTargetName/AppName/info.plist info.plist 파일 이동 시 에러 Resource 하위로 이동 빌드 시 에러: "Build input file cannot be found: ... info.plist" 해결 방법 info.plis File에 수정 준비: Target > Build Settings > Packaging info.plist File에 info.plist 주소 입력
Dynamic Type Sizes iOS 7+부터 사용자가 텍스트 크기를 선택할 수 있는 기능 존재 아이폰 > 설정 > 손쉬운 사용 > 디스플레이 및 텍스트 크기 > 더 큰 텍스트 사용자가 선호하는 텍스트 크기를 선택할 수 있도록하여 유연성을 제공 Larger Accessibility Type Sizes: Dynamic Type Sizes보다 더욱 큰 사이즈를 사용 Dynamic Type Sizes 사용 방법 코드에서는 .preferredFont(forTextStyle:)으로 사용 storyboard에서는 inspector에서 설정 UIFontTextStyle // UIFontTextStyle 사용 방법 bodyLabel.font = .preferredFont(forTextStyle: .body) cal..
HTML 특수문자 코드 HTML코드를 표현문자로 변경 HTML 특수문자 코드 변경 후 1 '가나다' 2 "가나다" Swift에서 변경 방법 String extension으로 추가 extension String { init?(htmlEncodedString: String) { guard let data = htmlEncodedString.data(using: .utf8) else { return nil } let options: [NSAttributedString.DocumentReadingOptionKey: Any] = [ .documentType: NSAttributedString.DocumentType.html, .characterEncoding: String.Encoding.utf8.rawValue..
1. iOS 스러운, storyboard 활용 방법 (static prototype cell, segue, gesture) 2. iOS 스러운, storyboard 활용 방법 (dynamic prototype cell, unwind segue, storybaord reference) storyboard 활용 (UI, flow) 목적: code 없이 storyboard만을 이용하여 플로우, UI 구현 code없이 storyboard를 사용하는 이유: 빠른 생산성, 직관성 1번 챕터에서 storyboard로 화면을 빠르게 만들며 prototype을 잡은 후 2번 챕터에서 controller를 통해 데이터 다루는 형식 앱 구현 방식: 디자인, flow prototype -> 로직 구현 프로젝트 플레이어 목록 ..
Cell에 매핑될 모델 추가 struct CustomCellModel { let leftImage: UIImage let leftTitle: String } Custom Cell 추가 id 정의 class CustomCell: UITableViewCell { static let identifier = "CustomCell" } 나머지 뷰 정의 주의: hugging, compression값 설정 참고 // CustomCell.swift lazy var stackView: UIStackView = { let stackView = UIStackView(arrangedSubviews: [leftImageView, leftLabel, rightButton]) contentView.addSubview(stackVi..
StackView에서 사용할 것 distribution은 axis 방향 alignment는 axis 반대 방향 속성 axis alignment distribution 내부 뷰들의 auto layout 설정 StackView 속성 stackView.axis = .horizontal (default) horizontal vertical stackView.alignment = .fill (default) fill: 내부 view들을 stackView.axis의 반대 방향으로 stretch stackView.distribution = .fill (default) fill: 스택뷰 방향쪽으로 남은 공간에 stretch되는 형태 Fill Proportionally: 내부 view들이 intrinsic content..