분류 전체보기
-
Accessibility - VoiceOveriOS 2022. 4. 12. 18:40
안녕하세요. 오늘은 Accessiblity, 그중에서도 VoiceOver에 관하여 알아보겠습니다. 1. Accessibility https://developer.apple.com/design/human-interface-guidelines/accessibility/overview/introduction/ Introduction - Accessibility - Human Interface Guidelines - Apple Developer Accessibility People use Apple’s accessibility features, such as reduced transparency, VoiceOver, and increased text size, to personalize how they inte..
-
Model-View-ViewModel(MVVM)Swift 2022. 4. 8. 15:58
안녕하세요. 저번 시간에는 MVP 패턴을 통해서 Controller의 역할을 줄이고, UIKit과 분리되어 테스트 가능한 Presenter를 만들어보았습니다. 하지만 여전히 해결하지 못한 문제가 남아있었죠.. 바로 Presenter가 View를 알고 있다는 사실입니다. 아무리 Protocol을 통해 참조를 하고 있더라도 View에 대한 Presenter의 종속성은 남아 있습니다. 이것마저 해결할 수 있는 방법이 있지 않을까요?? Presenter가 View를 모르게 하는 방법.. 사실 우리는 MVC를 공부하면서 비슷한 개념을 경험해봤습니다. 감이 오시나요?? 차근차근 알아보도록 하겠습니다. 1. MVC에서? MVC를 학습하면서 위의 그림을 모두 보셨을 겁니다. 위 그림에서 주목해서 봐야할 부분은 봐야 할..
-
Model-View-Presenter(MVP)Swift 2022. 4. 4. 20:41
안녕하세요. 지난 시간에는 MVC에 대해서 알아보았습니다. MVC 역시 선배 개발자 분들의 수많은 고민이 담긴 훌륭한 아키텍처였지만, 해결하지 못한 문제들이 존재했습니다. 1. Controller의 역할이 너무 커진다.(Massive View Controller..) 2. ViewController가 UIKit에 의존적이기 때문에 테스트하기 어렵다. 이러한 문제를 해결하기 위해서 고민한 결과 등장한 것이 바로 Model-View-Presenter(MVP)입니다. 1. MVP MVP는 Controller가 UIKit과 의존적이기 때문에 테스트가 어려우니 UIKit에 독립적이면서 Controller의 역할을 하는 객체를 만드는 게 어떨까라는데서 시작합니다. 구조는 다음과 같습니다. 얼핏 봐서는 MVC와 뭐가..
-
Model-View-Controller(MVC)Swift 2022. 4. 3. 17:55
안녕하세요. 오늘부터 아키텍처 패턴들에 대해서 하나씩 알아보도록 하겠습니다. 오늘은 그중에서 아마 가장 처음 접하게 될 Model-View-Controller, 즉 MVC에 대해서 살펴보겠습니다. 1. MVC https://developer.apple.com/library/archive/documentation/General/Conceptual/DevPedia-CocoaCore/MVC.html Model-View-Controller Retired Document Important: This document may not represent best practices for current development. Links to downloads and other resources may no longer b..
-
Property WrapperSwift 2022. 3. 25. 23:55
안녕하세요. 요즘 SwiftUI에 대해서 학습을 하고 있는 와중에 @State니 @Binding이니 낯선 키워드들을 접하게 되었습니다. 그러고 보니 Combine을 사용하면서 @Published와 같은 Property Wrapper들을 사용하고 있었는데요. 오늘은 그 Property Wrapper에 대해서 알아보도록 하겠습니다. 1. Property Wrapper https://docs.swift.org/swift-book/LanguageGuide/Properties.html#ID617 Properties — The Swift Programming Language (Swift 5.6) Properties Properties associate values with a particular class, str..
-
SwiftUI - StackiOS 2022. 3. 24. 23:31
안녕하세요. 오늘은 SwiftUI에서 View들을 배치하는 데 사용되는 Stack에 관해서 알아보겠습니다. SwiftUI는 세 종류의 Stack을 제공하고 있습니다. 수직으로 뷰들을 배치하는 VStack, 수평으로 뷰들을 배치하는 HStack, 그리고 Z축으로 뷰들을 배치하는 ZStack이 있습니다. (LazyVStack과 LazyHStack은 나중에 다루도록 하겠습니다.) UIKit에서 StackView를 다루어봤던 분들이라면 어떤 식으로 뷰들이 배치가 되는지 상상이 되실거라 생각합니다. 지금부터 하나씩 살펴보도록 하겠습니다. 1. VStack https://developer.apple.com/documentation/swiftui/vstack Apple Developer Documentation de..
-
동시성 프로그래밍(8) OperationQueueiOS 2022. 3. 22. 00:46
안녕하세요. 오늘은 OperationQueue에 대해서 알아보도록 하겠습니다. 1. OperationQueue https://developer.apple.com/documentation/foundation/operationqueue Apple Developer Documentation developer.apple.com 지난 시간까지 Operation에 대해서 알아보았는데요. OperationQueue는 이름 그대로 Operation들의 실행을 제어하는 Queue입니다. DispatchQueue를 생각하면서 OperationQueue는 어떤 속성들을 가지고 있는지 하나씩 확인해보겠습니다. 1) Serial or Concurrent? https://developer.apple.com/documentatio..
-
UIResonder & Responder ChainiOS 2022. 3. 17. 17:58
안녕하세요. 오늘은 UIResponder와 Responder Chain에 대해서 알아보겠습니다. 1. UIResponder https://developer.apple.com/documentation/uikit/uiresponder/ Apple Developer Documentation developer.apple.com Responder Chain을 이해하기 위해서는 먼저 UIResponder에 대해서 알아야 합니다. UIResponder는 이벤트에 반응하고 처리하기 위한 추상 클래스입니다. UIKit이 제공하는 대부분의 객체들이 UIResponder를 상속받고 있습니다. UIResponders는 다양한 이벤트들을 처리하기 위한 메서드들을 제공하고 있습니다. 자주 사용해본 touchesBegan(_:wi..