而當一個類別遵循這個協定時,除了 static 還可以使用 class 關鍵字來定義類別的這個型別方法。 協定定義方法的格式如下: protocol SomeProtocol { // 定義一個型別方法 ...
確定! 回上一頁