i have multi pages pdf,i want to go to the next page of pdf开发者_Python百科, how to go this.
(page -> the page you want to display, pdfReference: a reference to a CGPDFDocumentRef)
  pageReference = CGPDFDocumentGetPage(pdfReference, page);
  CGContextRef context = UIGraphicsGetCurrentContext();
  @try {
    CGContextTranslateCTM(context, 0.0, self.bounds.size.height);
    CGContextScaleCTM(context, scale, -scale);
    CGContextSaveGState(context);
    CGAffineTransform pdfTransform = CGPDFPageGetDrawingTransform(pageReference, kCGPDFCropBox, self.bounds, 0, true);
    CGContextConcatCTM(context, pdfTransform);
    CGContextDrawPDFPage(context, pageReference);
    CGContextRestoreGState(context);
  }
  @finally {
    UIGraphicsEndImageContext();
  }
insert this into a drawRect:(CGRect) and you are fine to go
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论