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 |
Tags
- AVFoundation
- UIDocument
- IOS
- Equatable
- JSONDecoder
- Stanford cs193p
- UIGestureRecognizer
- Singleton Design Pattern
- rxswift
- UIDocumentBrowserViewController
- NSAttributedString
- UIDynamicAnimator
- Codable
- uicollectionview
- CoreGraphics
- reactivex
- PhotoKit
- Hashable
- Arc
- CustomStringConvertible
- 오늘의성취도
- Git
- unowned
- weak
- Observable
- Swift
- UIBezierPath
- 에어팟
- MVP
- JSONEncoder
Archives
- Today
- Total
목록CustomStringConvertible (2)
아직은 개린이

애플 공식 문서에 보면, CustomStringConvertible은 텍스트적인 표현을 커스터마이즈하는 타입이라고 적혀있다. 공식 문서에 나온 예시를 보면, CustomStringConvertible 프로토콜을 정의하지 않고, 그냥 구조체를 출력하면 기본 표현으로 출력한다. struct Point { let x: Int, let y: Int } let p = Point(x: 21, y: 30) print(p) // Prints "Point(x: 21, y: 30)" 하지만, CustomStringConvertible 프로토콜을 정의하면, 사용자가 정의한 형태로 출력이 되는 것을 확인할 수 있다. extension Point: CustomStringConvertible { var description: S..
Swift + iOS/Swift
2020. 2. 10. 21:51

프로젝트 소개 Stanford 2017 cs193p 강좌의 두번째 과제 Set 게임 만들기 과제안내서 : https://github.com/duliodenis/cs193p-Fall-2017/blob/master/problemsets/Programming_Project_2_Set.pdf 개발 인원 및 기간 1명 / 2일 구조 스크린샷 배운점 CustomStringConvertible, Hashable, Equatable 프로토콜 Extension 사용법 NSAttributedString 클래스
Project
2020. 2. 10. 16:06