일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |
- ribs
- 리팩토링
- uitableview
- Human interface guide
- UICollectionView
- uiscrollview
- HIG
- 클린 코드
- 스위프트
- map
- Observable
- UITextView
- RxCocoa
- 리펙토링
- SWIFT
- swift documentation
- Clean Code
- rxswift
- collectionview
- 리펙터링
- tableView
- 애니메이션
- Refactoring
- MVVM
- Protocol
- swiftUI
- combine
- Xcode
- clean architecture
- ios
- Today
- Total
목록2022/12 (32)
김종권의 iOS 앱 개발 알아가기
목차) Build Setting 목차 링크 Architecture란? 디바이스 및 맥북의 CPU를 의미 실물 디바이스 - 대부분 arm64 (아이폰 5s이상은 모두 arm64) 시뮬레이터 - 맥북의 아키텍쳐에 따라감 (인텔 맥북은 x86_64, Apple Silicon 맥북은 arm64) 시뮬레이터에 관한 아키텍쳐는 디폴트로 arm64, x86_64를 제공 terminal에서 시뮬레이터 관한 정보 확인 방법 open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/SDKSettings.json Architecture 세팅 방법 Valid Archite..
싱글톤 패턴 인스턴스는 오직 한개를 사용하고, 라이프사이클 동안 절대 해제되지 않는 하나의 인스턴스 유지 swift에서는 static와 함께 전역변수로 선언하면 lazy하게 동작하는 장점이 존재 swift에서는 멀티 스레드에서 singleton을 사용해도 thread safe한 장점이 존재 (아래에서 계속) public class MyClass { static let shared = MyClass() private init() {} public func printSome() { print("some") } } MyClass.shared.printSome() swift에서의 싱글톤 동작 singleton 패턴은 SRP(Single Responsibility Principle) 원칙을 위반 SRP원칙이란 하..
* 최신 Tuist 내용은 이 포스팅 글 참고 1. Tuist로 모듈화하기 - 이미 존재하는 프로젝트에 적용 방법
Optimization Level 종류 *Optimization Level이란? 컴파일러 옵션의 종류를 의미 Onone: debug 모드 (최소한의 최적화와 디버그 정보 기록 o) O: release 모드 (최적화 수행과 디버그 정보 기록 x) Osize: 성능보다 코드 사이즈를 줄이는 것에 최적화 Optimization Level 설정 방법 Xcode > Build Settings > Swift Compiler - Optimization Level에서 설정 Debug의 디폴트값은 -Onone (최적화는 되지 않지만 디버그 정보 기록 o) Release의 디폴트값은 -O (최적화하고 디버그 정보 기록 x) cf) Apple Clang - Code Generation 부분은 Objective-C 옵션 as..
1. 유닛 테스트 방법 - Dependency Injection (@Injected) 주입 구조 2. 유닛 테스트 방법 - Quick과 Nimble을 이용한 테스트 코드 구현 방법 3. 유닛 테스트 방법 - RxExpect를 이용한 Rx관련 비동기 테스트 코드 구현 방법
1. 유닛 테스트 방법 - Dependency Injection (@Injected) 주입 구조 2. 유닛 테스트 방법 - Quick과 Nimble을 이용한 테스트 코드 구현 방법 2 expect("seahorse").to(contain("sea")) expect(["Atlantic", "Pacific"]).toNot(contain("Mississippi")) expect(ocean.isClean).toEventually(beTruthy()) expect(seagull.squawk).toNot(equal("Oh, hello there!")) expect(seagull.squawk).notTo(equal("Oh, hello there!")) ex) nimble까지 적용한 예제 final class Some..
1. 유닛 테스트 방법 - Dependency Injection (@Injected) 주입 구조 Any]로 선언한 이유는 lazy하게 인스턴스들이 동작되도록 하기 위함 클로저의 특성 - 실행 지연이 가능 // https://medium.com/streamotion-tech-blog/magic-dependency-injection-in-swift-70476c7743ec public class DependencyStore { #if DEBUG public static var shared = DependencyStore() #else public static let shared = DependencyStore() #endif public init() {} /// A map of `identifier(for:)..
사전 지식 아래 코드에서 1번과 2번 중 subscription 영역과 observing 영역을 구분하면? 1번 - subscription 영역 2번 - observing 영역 Observable .create { observer in // 1. } .subscribe(onNext: { _ in // 2. }) .disposed(by: disposeBag) subscribe(on:)와 observe(on:) subscribe(on:)은 subscription영역에 대한 스레드를 의미 observe(on:)은 observing영역에 대한 스레드를 의미 테스트 메인 스레드에서 아래 코드 호출 subscription영역과 observing영역은 main thread Observable .create { obs..