gpt4 book ai didi

ios - 在仅查看模式下使用 PDF Kit 加载 pdf

转载 作者:塔克拉玛干 更新时间:2023-11-02 22:03:10 26 4
gpt4 key购买 nike

我正在使用以下简单代码来加载 pdf 表单,但我不希望以可编辑的形式加载它。我没有发现任何限制它以仅查看模式加载的内容。

NSData *fileData = [NSData dataWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"PdfFormExample" ofType:@"pdf"]];
PDFDocument *pdfDocument = [[PDFDocument alloc] initWithData:fileData];
PDFView *pdfView = [[PDFView alloc] initWithFrame:self.view.frame];
pdfView.document = pdfDocument
[self.view addSubView:pdfView];

谢谢

最佳答案

我认为您想禁用 LongPressGestureRecognizer。像这样:

    private static void DisableDefaultLongPressGestureRecognizer(PdfKit.PdfView oPdfView)
{
oPdfView
.GestureRecognizers
.Where(x => x is UILongPressGestureRecognizer)
.ForEach((oLongPressGestureRecognizer, nIndex) =>
{
oLongPressGestureRecognizer.Enabled = false;
});
}

关于ios - 在仅查看模式下使用 PDF Kit 加载 pdf,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50129228/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com