브래드의 메모장

  • 홈
  • 태그
  • 방명록

@escaping closure 1

Swift) Continuations 활용

Continuations에는 withCheckedContinuation, withCheckedThrowingContinuation 가 있습니다. 둘 중에 차이는 에러를 return 하는지 안하는지 차이가 있습니다.Continuations는 비동기 코드, Closure형태를 async로 변경할때 많이 사용합니다.단, 주의사항이 있습니다.한번에 continue를 두 번이상 호출하면 안되고, resume을 호출하면 안됩니다. 그렇게 되면 Task가 무기한 일시 중단 상태로 되어버립니다.(앱이 멈추고 결국엔 강제종료가 됩니다.)Closure를 async로 변경하는 예시 코드에러 xClosurefunc requestWeclomeMessage(completion: ((String) -> Void)) { compl..

iOS/Swift 2024.05.20
이전
1
다음
더보기
프로필사진

브래드의 메모장

  • 분류 전체보기
    • 생각정리
    • 경험
      • 내일채움공제
      • 야곰아카데미
    • iOS
      • WWDC
      • iOS
      • Objective-C
      • Swift
      • SwiftUI
      • HTTP
      • 트러블 슈팅
      • TestFlight
    • Algorithm
      • 프로그래머스
    • Tool
      • OrCAD
      • P-touchEditor
      • Git
    • Another
      • Azure IoT
      • mqtt
      • PDF
      • 라즈베리파이
      • 회로설계

Tag

UserInterfaceState.xcuserstate, GIT, TableView, uiview 맨 앞으로, ios, iOS부트캠프, pod install 에러, 생체인증 타입 확인, beyond a symbolic link, Objective-C, presentviewcontroller, 커리어스타터, MQTT, multpart/form-data, @escaping closure, universal link, largeTitle, SWiFT, localized, 라즈베리파이,

최근글과 인기글

  • 최근글
  • 인기글

최근댓글

공지사항

페이스북 트위터 플러그인

  • Facebook
  • Twitter

Archives

Calendar

«   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

방문자수Total

  • Today :
  • Yesterday :

Copyright © Kakao Corp. All rights reserved.

티스토리툴바