WWDC 21 영상 Meet async/await in Swift - WWDC21 - Videos - Apple Developer Swift now supports asynchronous functions — a pattern commonly known as async/await. Discover how the new syntax can make your code... developer.apple.com Asynchronous programming 보편적으로 사용하지만 verbose, complex, incorrect 하다는 단점이 있음 completionHandler 또는 delegate 콜백으로 값을 받음 Example 기존에 사용하던 방식으로 fetchThumbnail이라는 thumbnail 이미지..
GCD (Grand Central Dispatch) 여러 thread가 task를 처리할 수 있도록 Queue(Dispatch Queue)에 들어온 task를 적절하게 분배해주는 시스템 Sync / Async sync: 코드 한 줄씩 작업 다 끝날 때 까지 기다린 다음에 다음 라인 실행 (queue에 들어간 task가 모두 완료 되어야 다음 task를 수행함) async: 기다리는 작업없이 다음 코드라인을 바로 실행 (queue에 들어간 task가 완료 되는지에 관계 없이 바로 다음 task를 수행함) Serial / Concurrent (Queue에서 작업을 분배하는 방법) - Serial: 하나의 thread가 순차적으로 처리하게 된다. - Concurrent: 여러 thread가 queue의 작업을..
API 호출해 받은 Data를 json 파일로 저장하기 https://eunjoochoi.github.io/ios/save-json-file API 호출해 받은 Data를 json 파일로 저장하기 개발 공부하는 곳 eunjoochoi.github.io HTML로 내려오는 문자열을 정상 표기로 변환하기 https://eunjoochoi.github.io/ios/html-to-string [Swift] HTML로 내려오는 문자열을 정상 표기로 변환하기 HTML To String eunjoochoi.github.io JSONDecoder 내가 원하는 모양으로 파싱하기 https://eunjoochoi.github.io/ios/swift-json-custom-decoding [Swift] JSONDecoder ..