美文网首页
打开PDF阅读crash记录-iOS

打开PDF阅读crash记录-iOS

作者: DSA碼侬 | 来源:发表于2018-08-06 15:19 被阅读27次

app中,本地下载好的pdf文件打开预览,用的是第三方pdf阅读软件(PDFReader),由于pdf文件过大,导致打开的时候,程序崩溃:

CGContextDrawPDFPage(context, _PDFPageRef); // Render the PDF page into the context

解决办法:

  //  在上句之前加上  防止崩溃
  CGContextSetRenderingIntent(context, kCGRenderingIntentDefault);
  CGContextSetInterpolationQuality(context, kCGInterpolationHigh);

  CGContextDrawPDFPage(context, _PDFPageRef); // Render the PDF page into the context

来源:stackoverflow

相关文章

网友评论

      本文标题:打开PDF阅读crash记录-iOS

      本文链接:https://www.haomeiwen.com/subject/cncgvftx.html