我正在为以下代码崩溃。有人可以帮我解决这个问题吗?
NameError: name 'database' is not defined
如果我设置了同样的代码,
PDFPage *page = [self.pdfDocument pageAtIndex:0];
PDFAnnotationSquare *annotation = [[PDFAnnotationSquare alloc] init];
NSColor *interiorColor = [NSColor colorWithPatternImage:@"TestImage"];
annotation.interiorColor = interiorColor;
annotation.bounds = NSMakeRect(100.0, 100.0, 300, 300);
[page addAnnotation:annotation];
[self.pdfDocument writeToFile:@"SomePath"];