2017-10-10から1日間の記事一覧
下で定義された2つのプロトコルに準拠する型の書き方です。 protocol MyProtocol1 {} protocol MyProtocol2 {} 複数のプロトコルへの準拠を表したい時は、下のように&を使います。 protocol MyProtocol1 {} protocol MyProtocol2 {} class MyClass: MyProtoc…
下で定義された2つのプロトコルに準拠する型の書き方です。 protocol MyProtocol1 {} protocol MyProtocol2 {} 複数のプロトコルへの準拠を表したい時は、下のように&を使います。 protocol MyProtocol1 {} protocol MyProtocol2 {} class MyClass: MyProtoc…