⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 formal_protocol-7.m

📁 linux下的gcc编译器
💻 M
字号:
/* Contributed by Nicola Pero - Fri Mar  9 21:35:47 CET 2001 */#include <objc/objc.h>#include <objc/Object.h>#include <objc/Protocol.h>/* Test defining two protocols, one incorporating the other one. */@protocol Configuring- (void) configure;@end@protocol Processing <Configuring>- (void) process;@end/* A class adopting the protocol */@interface Test : Object <Processing>{  BOOL didConfigure;  BOOL didProcess;}@end@implementation Test- (void) configure{  didConfigure = YES;}- (void) process{  didProcess = YES;}@endint main (void){  id <Processing> object = [Test new];  [object configure];  [object process];  return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -