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

기본 지식 - UIView.transition transition은 container view 관련된 곳에 애니메이션을 사용할 때 사용 키보드를 올릴 때, 그 위에있는 뷰를 UIView.transition 사용하여 올라가도록 하는데에 사용 주의) UIView.animate vs UIView.transition animate: 프로퍼티 개별적인 애니메이션 (ex- 뷰 확대, 축소, alpha값 변경) transition: 전체적인 스크린에서 동작 (뷰 이동) 구현 아이디어 뷰 정의 키보드를 감싸는 뷰, keyboardWrapperView 정의 키보드를 감싸는 뷰 위쪽 keyboardSafeAreaView 정의 auto layout으로 두 뷰의 레이아웃 정의 키보드의 높이가 변경될 때, keybaordWra..

1. iCloud, CloudKit 사용 방법 - Xcode, Profiles 세팅 2. iCloud, CloudKit, 사용 방법 - CloudKit Console 세팅 3. iCloud, CloudKit 사용 방법 - CloudKit 연동 (불러오기, 생성, 삭제, 업데이트) * 주의: iCloud 계정이 있는 디바이스에서 테스트 가능 (simulator에서 테스트 불가능) CloudKit 연동 방법 import CloudKit 사용 CloudManager라는 구조체를 만들어서, 이 구조체의 메소드를 통해 불러오기, 생성, 삭제, 업데이트 사용 import CloudKit enum FetchError { case addingError, fetchingError, deletingError, noReco..

1. iCloud, CloudKit 사용 방법 - Xcode, Profiles 세팅 2. iCloud, CloudKit 사용 방법 - CloudKit Console 세팅 3. iCloud, CloudKit 사용 방법 - CloudKit 연동 (불러오기, 생성, 삭제, 업데이트) * 주의: iCloud, CloudKit 사용 방법 - Xcode, Profiles 세팅의 예제 코드에서 Bundle Identifier가 com.jake.ExiCloud에이었지만, 아래부터 com.jake.ExiCloud으로 변경 Console 접속, Container 선택 CloudKit Console 클릭 CloudKit DataBase 선택 Container 선택 - cloud.{bundle Identifier} Recor..

연속된 애니메이션 구현 방법 UIView.animate를 사용하면 nested 되는 성격이 존재하여 가독성에 좋지 않은 코드로 표출 4개의 연속된 애니메이션을 UIView.animate로 구현 시 아래처럼 nested 되어 가독성에 안좋은 코드로 표출 UIView.animate( withDuration: 3, delay: 0, options: .curveEaseIn, animations: { // first animation }, completion: { _ in UIView.animate( withDuration: 3, delay: 0, options: .curveEaseIn, animations: { // second animation }, completion: { _ in UIView.animate..
final class vs class final class A { ... } class B { ... } class A와 class B의 차이점 A는 서브클래싱이 불가능 A는 성능적으로 더욱 높은 장점 -> 성능이 좋은 이유? 성능이 좋은 이유 - static dispatch 사용 (아래에서 이어서 개념 설명) Static Dispatch (Direct Call) 변수를 타입에 맞춰서 메소드와 프로퍼티를 참조 참조될 요소를 컴파일 타임에 결정 상속 가능성이 없다는 keyword를 코드에 표출하면 컴파일러는 Static Dispatch를 사용 Dynamic Dispatch (Indirect Call) override, subclass와 같은 변수의 실제 타입의 맞춰서 메소드와 프로퍼티를 호출 대표적으로 객..

* KeyPath부터 구체적인 dynamic member lookup 개념은 이글 참고 dynamic member lookup @dynamicMemberLookup 키워드를 class, structure, enum, protocol에 적용하여 subscript(dynamicMember:)를 필수로 구현하게하여 런타임시점에 이름으로 dot ‘.’키워드로 접근 가능하도록 하는 방법 dot ‘.’ 키워드 사용하여 이름으로 접근 가능 주의: extension에는 @dynamicMemberLookup 적용 불가 ex) dyanmicMemberLookup을 사용하지 않고 subscript 구현 struct Person1 { var info: [String: String] // name: gender subscrip..

1. iCloud, CloudKit, 사용 방법 - Xcode, Profiles 세팅 2. iCloud, CloudKit, 사용 방법 - CloudKit Console 세팅 3. iCloud, CloudKit 사용 방법 - CloudKit 연동 (불러오기, 생성, 삭제, 업데이트) CloudKit을 사용하기 위한 Xcode 세팅 Host in CloudKit 체크 만약 기존 Xcode 프로젝트를 만들때 체크하지 않았다면, 이곳을 참고하여 CoreData 설정하고 Cloud 설정 참고 CloudKit을 사용하기 위한 저장소 iCloud Container 생성 CloudKit을 사용하려면, iCloud 동기화 때문에 Provisioning Profiles이 먼저 준비되어 있어야 사용 가능하므로 준비 필요 A..

* 타이머 종류 - foreground에서만 동작하는 Timer - background에서도 동작하는듯한 Timer Foreground에서만 동작하는 Timer 변수 하나를 선언해놓고 RxSwift의 연산자 interval(_:scheduler:) 사용 // ViewController.swift private var currentCount = 0 private func setupOnlyForegroundTimer() { let timer = Observable.interval( .seconds(1), scheduler: MainScheduler.instance ) timer.withUnretained(self) .do(onNext: { weakSelf, countValue in weakSelf.curre..