Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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
- iOS Target
- memory safety
- Dependency Rule
- coordinateSpace
- RIBs Tutorial
- SWIFT
- Git Large File Storage
- UICoordinateSpace
- in-out
- Ribs
- RxCocoa
- App Signing
- rib
- RxSwift
- ios
- windowScene
- iOS 버전 점유율
- 대머리깃허브
- Apple Certificate
- Dispatch.main.sync
- 잡초가득블로그
- Github file size
- 메모리 접근 충돌
- swiftdocs
- 클린아키텍쳐
- Automatically manage signing
- 로버트마틴형
- conflicting access to memory
- Large File Storage
- Concurrent
Archives
- Today
- Total
빙수왕의 개발일지
Swift 3개 이상의 값 비교하기 본문
일단 값이 3개일때는 아래처럼 튜플을 사용해서 하는 방법이 있다.
if (firstValue, secondValue) == (secondValue, thirdValue)
그리고 더 많은 값을 비교할 떄는 아래처럼 Set안에 넣어서 비교하는 방법도 있다.
if (Set(firstValue, secondValue, thirdValue, fourthValue).count == 1)
'개발 > iOS' 카테고리의 다른 글
| Convenience init을 강제하는 법 (0) | 2020.11.29 |
|---|---|
| UICollectionView의 cellForItem이 nil이 나올 때 (0) | 2020.11.25 |
| withIdentifier 하드코딩 말고 다른방법 (0) | 2020.10.11 |
| Playground 기능 (0) | 2020.08.07 |
| _ sender: Any에서 언더바 _는 뭘까 - 전달인자 라벨, 와일드카드 식별자 (0) | 2020.07.18 |