본문 바로가기

Tunko Development Diary

검색하기
Tunko Development Diary
프로필사진 Tunko

  • Tunko room (147)
    • Development (144)
      • SwiftUI (14)
      • iOS 개발 (57)
      • 개발도서 독후감 (1)
      • RxSwift (36)
      • Nest.js (8)
      • Node.js (13)
      • Typescript | GraphQL | type.. (2)
      • TCP|IP (3)
      • C++, C++11 (5)
      • Cocos2d-x 3.v (3)
      • IDE (1)
      • php (1)
    • Life (0)
      • 주저리 (0)
    • Drawing (2)
      • Tool (2)
Guestbook
반응형
Notice
Recent Posts
Recent Comments
Link
«   2025/07   »
일 월 화 수 목 금 토
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
Tags
  • @Binding
  • vim
  • RFC1738/1808
  • ios14
  • RxCocoa
  • init?
  • SwiftUI
  • graphql
  • RxSwift
  • nestjs
  • @EnvironmentObject
  • NullObject
  • operator
  • Operators
  • Creating Operators
  • SWIFT
  • @State
  • typeorm
  • init
  • Xcode
  • URL(string:)
  • @Environment
  • subject
  • Operater
  • swift6
  • IOS
  • nonisolated
  • dismiss
  • Bug
  • NavigationLink
more
Archives
Today
Total
관리 메뉴
  • 글쓰기
  • 방명록
  • RSS
  • 관리

목록?? (1)

Tunko Development Diary

swift) ?? 연산자

Nil 병합 연산자 (Nil - Coalescing Operator) nil 병합 연산자는 a ?? b 형태를 갖는 연산자 입니다. 옵셔널 a를 벗겨서 unwraps 만약 a가 nil 경우 b를 반환합니다. 이 nil 병합 연산자는 다음 코드의 축약형 입니다. a != nil ? a! : b if a != nil { return a! } else { return b } 출처 : https://jusung.gitbook.io/the-swift-language-guide/language-guide/02-basic-operators#nil-nil-coalescing-operator

Development/iOS 개발 2022. 6. 20. 15:17
Prev 1 Next

Blog is powered by kakao / Designed by Tistory

티스토리툴바