1
私は、iOSとpdfsを表示・編集するmacアプリケーションの実装に取り組んでいます。PDFTron macの実装
- iOSバージョンの実装は、次のコードを使用して終了します。
- 問題はMac版で、pdfsの表示と編集に必要なPTPDFViewCtrlとToolManagerクラスは含まれていません。
同等のクラスを使用して、Macの実装や推奨されるMacの実装を経験したことがある人はいますか?
#pragma mark - PDFKit
-(void)initialConfig {
#warning MISSING PDFTRon license key
// initialize PDFNet
[PTPDFNet Initialize:@""];
PTPDFViewCtrl *ctrl = [PTPDFViewCtrl new];
CGFloat offset = 20;
ctrl.frame = CGRectMake(0, offset, self.view.frame.size.width, self.view.frame.size.height - offset);
[ctrl SetBackgroundColor:0 g:0 b:0 a:0];
[ctrl SetHighlightFields:YES];
self.view.backgroundColor = [UIColor lightGrayColor];
[self.view addSubview:ctrl];
// open the PDF document included in the bundle in the PTPDFViewCtrl
PTPDFDoc *doc = [[PTPDFDoc alloc]initWithFilepath:self.viewModel.getFilePath];
[ctrl SetDoc:doc];
self.viewModel.doc = doc;
[ctrl setAutoresizingMask:UIViewAutoresizingFlexibleHeight | UIViewAutoresizingFlexibleWidth];
// add the toolmanager (used to implement text selection, annotation editing, etc.
ToolManager *toolManager = [[ToolManager alloc] initWithPDFViewCtrl:ctrl];
[toolManager changeTool:[PanTool self]];
ctrl.toolDelegate = toolManager;
}
任意の助けのためにありがとうございました。 Matti