일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- HIG
- Clean Code
- map
- clean architecture
- Human interface guide
- MVVM
- 리펙토링
- Refactoring
- rxswift
- UICollectionView
- Protocol
- UITextView
- Xcode
- uitableview
- uiscrollview
- combine
- Observable
- collectionview
- 클린 코드
- tableView
- 리펙터링
- 애니메이션
- 스위프트
- swift documentation
- RxCocoa
- swiftUI
- ribs
- 리팩토링
- SWIFT
- Today
- Total
목록ios (1095)
김종권의 iOS 앱 개발 알아가기

Operation single task에 관한 데이터와 코드를 나타내는 추상 클래스 해당 클래스를 서브클래싱하여 사용하면 안정적으로 task를 실행시킬 수 있는 효과 존재 OperationQueue Operation 객체들을 priority에 의해서 실행시키는 queue 한번 operation queue에 Opertaion 객체를 담아놓으면 task가 끝날때까지 queue가 없어지지 않고 존재 해당 queue에서 Operation들을 삭제하거나 명령시킬 수 있는 장점이 존재 (task관리에 이점) Operation, OperationQueue의 핵심 Operation을 서브클래싱한 것은 기능을 캡슐화 했다는 의미이므로, 기능에 관한 모듈성 향상 task의 실행, 정지, 대기와 같은 실행 상태를 알 수 있..

KeyPath란? 특정 루트 유형(class 타입, struct 타입)에서 value type으로의 참조를 의미 Property의 reference값을 의미 (c에서의 포인트 개념과 유사) * 구체적인 KeyPath, KVC, KVO 개념은 다음 포스팅 글 참고 KeyPath 사용 방법 KeyPath 참조 얻어내는 방법 let userNameKeyPath = \\User.name print(userNameKeyPath) // Swift.KeyPath KeyPath 참조를 통해 값에 접근하는 방법 let userNameKeyPath = \\User.name print(userNameKeyPath) // Swift.KeyPath let user1 = User(name: "jake", email: "a@a.c..

1. ReactorKit 샘플 앱 - RxDataSources 사용 방법 2. ReactorKit 샘플 앱 - RxDataSources을 이용한 Section, Item 모델 구현 패턴 (with 동적 사이즈 셀) 기초 ReactorKit 개념 RxDataSources 개념 Reusable 개념 ReactorKit + RxDataSources 사용 방향 RxDataSources를 사용하면 extension으로 따로 tableView의 cellForRowAt 메소드를 따로 빼지 않아도 간결한 코드 작성이 가능 Cell에 사용될 상태 관리 전용 Reactor 생성 Cell에 UI를 업데이트 할 때 이 Reactor 인스턴스를 받아서 사용 정의한 Cell 클래스에 bind(reactor:) 함수를 정의하여, ..

RxCocoa에서 제공하는 방법으로 tableView의 ControlEvent 처리 방법 RxCocoa의 UITableView+Rx 파일에 존재 itemSelected: 선택한 셀의 IndexPath 값 획득 // viewDidLoad()에서 호출 private func setupTableViewDelegate() { tableView.rx.itemSelected .map { "셀 선택 indexPath = \($0)" } .bind(to: titleLabel.rx.text) .disposed(by: disposeBag) } modelSelected: 선택한 셀의 model 값을 획득 itemDeleted tableView.rx.itemDeleted .map { "아이템 제거 = \($0)" } .bin..

Reusable 프레임워크 Cell 등록 시 편의성 향상 문자열을 입력하지 않고, 클래스만 입력하여type-safe하므로 컴파일 타임에 오류 감지 가능 Reusable 미적용 - tableView에 cell을 등록하고 cell을 리턴 할 경우 // cell 등록 tableView.register(MyTableViewCell.self, forCellReuseIdentifier: "MyTableViewCell") // dequeue cell let cell = tableView.dequeueReusableCell(withIdentifier: "MyTableViewCell", for: indexPath) as! MyTableViewCell Reusable 적용 - tableView에 cell을 등록하고 ce..

1. Kingfisher 프레임워크 (이미지 캐싱, 이미지 로드) - 사용 방법 2. Kingfisher 프레임워크 (이미지 캐싱, 이미지 로드) - .processor, progressiveJPEG 옵션 Kingfisher 기능 이미지 로드 기능 (url을 넘겨주면 이미지 로드) 이미지 캐시 기능 UIImageView에 편리하게 round 처리 기능 이미지 다운로드 기능 의존성 cocoapods 사용 시 설치 pod 'Kingfisher' 이미지 로드 기능 이미지 단순히 불러오기 - .kf.setImage(with:) private func loadImage() { guard let url = URL(string: "https://live.staticflickr.com/65535/51734305911..

SwiftGen R.swift와 같이 프로젝트 리소스를 Swift코드로 생성해주는것 R.swift는 모든 리소스에 대해서 코드화가 되지만, SwiftGen은 Assets파일 따로, String파일 따로 코드화가 가능 문자열을 통해 Image등을 불러올 때 오타가 생길 위험을 피할 수 있는 장점 존재 SwiftGen 설치 전 준비 SwiftGen 설치 전 준비 HomeBrew 설치 (Brewfile을 이용하여 설치할 것) Mint 설치 프로젝트 디렉토리에 Mintfile 생성 SwiftGen/SwiftGen@6.5.1 프로젝트 디렉토리에 Mintfile 실행 mint bootstrap --link # arm cpu인 경우 arch -arm64 mint bootstrap --link * Failed to..

Mint 란? SPM을 지원하는 프레임워크를 편하게 설치할 수 있는 Swift command line 툴 장점 특정 버전의 패키를 쉽게 실행 패키지를 전역으로 link 기능이 간편 빌드는 버전 별로 자동으로 캐싱 쉽게 사용할 수 있도록 Mintfile에 버전이 지정된 패키지 목록을 지정하여 사용 Home brew로 Mint 설치 HomeBrew 설치 방법은 이곳 참고 M1에서 설치 $ arch -arm64 brew install mint (intel에서 설치) $ brew install mint mint 사용 준비 - Mintfile 파일 project의 root 폴더에 Mintfile 파일 생성 $ vi Mintfile realm/SwiftLint@0.44.0 입력 후 저장 Mintfile에 명시된 의..