본문 바로가기 메뉴 바로가기

Peppo

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

Peppo

검색하기 폼
  • 분류 전체보기 (221)
    • Story (13)
    • iOS (143)
      • Error (11)
    • 알고리즘 (43)
    • ETC (7)
    • React-Native (0)
    • CS (Computer science) (3)
  • 방명록

Swift 탈출클로저 (1)
[Swift] 클로저 (Closure) (2) - Escaping Closure, Autoclosure

지난 클로저에는 값 캡처, 클로저 표현식 에 대해 알아봤는데요! 오늘은 클로저의 심화 과정인 Escaping 클로저 Auto 클로저 에 대해 정리해 보려고합니다! 탈출 클로저 (Escaping Closures) 간단하게 표현하면, 함수가 끝나고 실행되는 클로저 이며, 비동기 작업을 하기 위해 사용합니다. 클로저를 함수의 파라미터로 넣을 수 있는데, 이때 파라미터 타입 앞에 @escaping 을 적어줌으로써 클로저가 escaping 할 수 있게 해줍니다. var completionHandlers: [() -> Void] = [] func withEscaping(completionHandler: @escaping () -> Void) { completionHandlers.append(completionHan..

iOS 2022. 2. 2. 21:50
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • Peppo's Github
TAG
  • Swift joined
  • Swift inout
  • Swift joined()
  • swift (programmers)
  • Swift ModernRIBs
  • RTCCameraVideoCapturer
  • CS 네트워크
  • removeLast()
  • Class
  • Swift Leetcode
  • Swift Error Handling
  • swift 고차함수
  • 원티드 프리온보딩
  • Swift
  • swift programmers
  • swift protocol
  • Combine: Asynchronous Programming with Swift
  • 2023년 회고
  • swift property
  • RIBs tutorial
  • swift reduce
  • Swift 알고리즘
  • iOS error
  • Swift RIBs
  • Swift init
  • Swift 프로퍼티
  • Swift 내림차순
  • Swift 프로그래머스
  • Swift final
  • ios
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

티스토리툴바