这是一个代码片段
#import "MyCustomView.h"
@implementation MyCustomView
-(void) drawRect:(CGRect)rect {
NSLog(@"Help");
CGContextRef myContext = [[NSGraphicsContext // 1
currentContext]graphicsPort];
Run Code Online (Sandbox Code Playgroud)
....
然后在1,我遇到此错误消息:
NSGraphicsContext undeclared (first use in this function)
Run Code Online (Sandbox Code Playgroud)
你知道是什么造成的吗?我应该包含哪个头文件?
| 归档时间: |
|
| 查看次数: |
926 次 |
| 最近记录: |