2014-10-03 119 views
0

這個簡單的drawAtPoint:withAttributes在iIOS7上可以正常工作,但在iOS8上訪問不正常時崩潰。我不能爲了我的生活而弄清楚發生了什麼。drawAtPoint崩潰iOS 8

UIFont *font = [UIFont fontWithName:@"Helvetica" size:8]; 
UIColor *color = [UIColor blueColor]; 

CGContextSetTextDrawingMode (pdfContext, kCGTextFill); 
CGContextSetFillColorWithColor(pdfContext, [color CGColor]); 
CGContextSetShouldAntialias(pdfContext, YES); 
CGContextSetShouldSmoothFonts(pdfContext, YES); 

NSString *cardId = sharedCard.cardId; 
[cardId drawAtPoint:CGPointMake(360, 602) withAttributes:@{NSFontAttributeName:font, NSForegroundColorAttributeName:color}]; 
+0

看來,這隻發生在我啓用了所有異常斷點時 – user1026741 2014-10-03 21:29:05

回答

0

異常是一個C++異常,可以安全地忽略它。

將異常斷點從「所有異常」更改爲「所有Objective-C異常」,並且應該處理此問題。