'await' 태그의 글 목록
본문 바로가기 메뉴 바로가기

@Override

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

@Override

검색하기 폼
  • 분류 전체보기 (873)
    • Mobile (430)
      • iOS (216)
      • Android (210)
      • React Native (1)
      • Flutter (0)
    • Language (51)
      • Java (15)
      • Kotlin (2)
      • Python (7)
      • JavaScript (5)
      • Go (12)
      • PHP (3)
      • Ruby (1)
      • C,C++ (1)
      • HTML, CSS (5)
    • Backend (125)
      • Server (83)
      • Spring (5)
      • GraphQL (1)
      • Docker (19)
      • AWS (1)
      • Kafka (2)
    • Database (16)
    • Game Engine (2)
    • Build System (2)
    • Version Control (45)
    • CI,CD (4)
    • Tool (39)
    • IT (19)
    • Coding (19)
    • My (11)
    • OS (72)
    • Any (22)
    • Food (4)
      • 감자탕 (2)
      • 고기 (1)
    • English (3)
  • 방명록

await (1)
iOS closure를 async, await 으로 변경하는

xcode 13.2 Beat에 iOS13 이상부터 Swift concurrency (async, await) 기능을 사용가능합니다. 완전히 좋은 기능입니다. 행복하죠. 콜백지옥에서 벗어날수 있습니다. 그럼 바로 변경하는 방법으로 넘어가겠습니다. withCheckedThrowingContinuation, withCheckedContinuation 를 이용하는 방법입니다. 다음과 같은 closure를 사용하는 곳이 있었다고 합시다. func testFunction(number: Int, handler: (Int) -> Void) { let sum = number + 1 handler(sum) } testFunction(number: 1) { value in print(value) } 결과는 2가 나옵니다. ..

Mobile/iOS 2023. 6. 7. 01:00
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • git
  • git - example
  • CocoaPods
TAG
  • ubuntu
  • nodejs
  • Codable
  • intellij
  • cocoapods
  • Windows
  • docker
  • centos8
  • Spring
  • Gradle
  • Java
  • enum
  • tomcat
  • android
  • ios
  • Python
  • golang
  • SWIFT
  • windows10
  • Xcode
  • git
  • Linux
  • github
  • php
  • CentOS
  • war
  • rxswift
  • Kotlin
  • MySQL
  • go
more
«   2025/05   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바