Swift
Swift 기초 (6): 프로토콜 (Protocol)
프로토콜 프로토콜은 메소드, 속성 그리고 다른 특정 작업 또는 기능의 부분에 맞는 요구 사항의 청사진을 정의합니다. 자바의 Interface와 유사한 개념이며, 클래스, 열거형(Enumeration), 구조체(Structure) 모두에 프로토콜을 사용할 수 있습니다. 다음은 프로토콜의 기본 형태입니다. protocol ExampleProtocol { var simpleDescription: String { get } var author: String { get set } mutating func 더보기…