Cocoa开发:文档应用、异常处理与调试指南
1. 文档应用中混合颜色的添加
在文档窗口中添加混合颜色样本是一个重要的步骤。首先,要在 CMDocument.h 文件中为每个样本添加一个输出口。同时,在文件顶部添加 @class 声明,告知编译器 CMColorBlendView 是一个类名,这样可以避免直接导入类的头文件,提高编译速度并减少头文件的依赖。以下是添加输出口后的 CMDocument.h 文件代码:
#import <Cocoa/Cocoa.h>
@class CMColorBlendView;
@interface CMDocument : NSPersistentDocument
@property (weak) IBOutlet CMColorBlendView *multiplyBlendView;
@property (weak) IBOutlet CMColorBlendView *screenBlendView;
@property (weak) IBOutlet CMColorBlendView *overlayBlendView;
@property (weak) IBOutlet CMColorBlendView *darkenBlendView;
@property (weak) IBOutlet CMColorBlendView *lightenBlendView;
@property (weak) IBOutlet CMColorBlendView *colorDodge
Cocoa开发:文档与调试详解
超级会员免费看
订阅专栏 解锁全文
39

被折叠的 条评论
为什么被折叠?



