我是 iPhone 开发者的新手,
我想手动调用构造函数,我应该怎么调用?
这是我的代码片段,
- (id)initWithFrame:(CGRect)frame {
if (self = [super initWithFrame:frame]) {
CFURLRef pdfURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("ePubTutorial.epub"), NULL, NULL);
pdf = CGPDFDocumentCreateWithURL((CFURLRef)pdfURL);
CFRelease(pdfURL);
self.pageNumber = 1;
self.backgroundColor = nil;
self.opaque = NO;
self.userInteractionEnabled = NO;
}
return self;
}
提前致谢 !!