Protocol 协议相关定义和操作方法
来源:互联网 发布:淘宝客服面试基本问题 编辑:程序博客网 时间:2024/06/05 00:28
生活中:就业协议,劳务协议
计算机中:http协议,udp协议,mail,telnet远程登录协议,ftp协议,usb1.0协议,usb2.0协议,usb3.0协议,spi协议,i2c协议
oc ios协议:方法的接口列表
//继承:子类继承父类的是变量跟方法,子类当中不需要实现继承过来的方法
//协议:能够被多个类共享方法接口,每个类在使用相关的方法的时候,需要自己去实现该方法,
每个类中的实现可能不同,但是方法的 的
*******************************************************
1.定制协议
//@protocol :定制协议
//Coder : 协议名
@protocol Coder <NSObject> //继承基协议
- (void)writeCode;
- (void)report;
- (void)debug;
@end
*******************************************************
2.遵守协议
@interface QFStudent : NSObject <Coder>
*******************************************************
3.实现协议
@implementation QFStudent
- (void)writeCode
{
NSLog(@“sdflaj");
}
- (void)report
{
NSLog(@“sdflaj");
}
- (void)debug
{
NSLog(@“sdflaj");
}
*******************************************************
- Protocol 协议相关定义和操作方法
- @protocol协议定义和遵守
- Category 类别相关定义和操作方法
- 协议protocol相关笔记
- Protocol Buffers定义协议格式
- CBCentralManagerDelegate Protocol 委托协议相关分析
- 协议(protocol)和委托(delegate)
- 协议(Protocol)的用法和代码例子
- category (类别) 和 protocol (协议)
- 协议(Protocol)的用法和代码例子
- 黑马程序员_OC_block和protocol协议
- OC 协议(Protocol)的基本概念和用法
- Protocol 协议和Delegate代理模式
- block块和Protocol(协议)
- protocol协议
- Protocol 协议
- Protocol 协议
- protocol 协议
- 黑马程序员——Java语言基础——06.集合框架(2)泛型和Map集合
- 内存管理1
- easings缓动函数速查 贝塞尔曲线实例
- 在eclipse中开发hadoop MapReduce
- POJ 3450 Corporate Identity 求所有字符的最长公共子串
- Protocol 协议相关定义和操作方法
- 博客都变味了!
- Java读取文件
- 自己编的MFC应用程序可以在没有安装编译器的电脑上运行了
- 用jquery获取复选框属性值
- Category 类别相关定义和操作方法
- Spark1.1.1官网文档翻译2快速开始
- Hibernate, Spring, Struts
- predis的主从用法