我的应用程序在[scrollView.layer renderInContext:pdfContext]中崩溃;当页数> 40时,在ipad设备上排队

时间:2013-01-29 11:00:20

标签: ipad pdf-generation scrollview

CGContextRef pdfContext = 
[self createPDFContext:scrollView.bounds  path:(__bridgeCFStringRef)filePath];
CGContextBeginPage (pdfContext,nil);
  • 列出项目

    for(int i = 0; i< 50; i ++) {     CGAffineTransform transform = CGAffineTransformIdentity;     transform = CGAffineTransformMakeTranslation(0,pageHeight + 5);     transform = CGAffineTransformScale(transform,1.0,-1.0);     CGContextConcatCTM(pdfContext,transform);

    [scrollView.layer renderInContext:pdfContext];
    NSLog(@"layer:%@",[scrollView layer]);
    CGContextEndPage (pdfContext);
    //[scrollView setContentOffset:CGPointMake(0, (i+1) * pageHeight+5) animated:NO];
    [scrollView setContentOffset:CGPointMake(0, pageHeight+5) animated:NO];
    

    CGContextRelease(pdfContext); }

    你可以告诉我哪里错了。

0 个答案:

没有答案