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 |
Tags
- uiscrollview
- Xcode
- ribs
- uitableview
- Human interface guide
- RxCocoa
- ios
- Clean Code
- rxswift
- HIG
- 클린 코드
- Protocol
- clean architecture
- SWIFT
- collectionview
- 리펙토링
- UITextView
- 리팩토링
- Observable
- 애니메이션
- combine
- 스위프트
- tableView
- Refactoring
- 리펙터링
- map
- MVVM
- UICollectionView
- swift documentation
- swiftUI
Archives
- Today
- Total
김종권의 iOS 앱 개발 알아가기
[iOS - swift] @discardableResult 본문
@discardableResult
- 의미: 문구 그대로 결과값을 discardable(버릴 수 있는) 의미
- 함수의 return값을 discadable시킬 수 있다는 의미 -> return 값을 사용하지 않아도 warning 메세지를 나오지 않도록 설정
@discardableResult를 사용방법
- Warning메세지: "Result of call to 'returnFunction(count:)' is unused"
- 해당 함수 위에다가 @discardableResult를 사용하면 warning메세지 제거
'iOS 기본 (swift)' 카테고리의 다른 글
[iOS - swift] switch와 where을 같이 사용하는 방법 (0) | 2021.02.25 |
---|---|
[iOS - swift] print vs NSLog (0) | 2021.02.24 |
[iOS - swift] 번들과 패키지(Bundle, package), Framework 개념 (0) | 2021.02.12 |
[iOS - swift] enumerated() 함수 (0) | 2021.02.09 |
[iOS - swift] HitTest 개념 (first responder, responder chain) (0) | 2021.02.09 |
Comments