logo
  • 教程列表
  • SO官方文檔
  • 協議
    • 可選和必需的方法
    • 檢查可選方法實現的存在性
    • 基本協議定義
    • 符合協議
    • 前瞻性宣告
    • 檢查符合協議
  1. StackOverflow 文件
  2. Objective-C Language 教程
  3. 協議
  4. 基本協議定義

基本協議定義

Created: November-22, 2018

定義新協議:

@protocol NewProtocol

- (void)protocolMethod:(id)argument;

- (id)anotherMethod;

@end
  • 符合協議
  • 檢查可選方法實現的存在性

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明