2014-10-03 106 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异常”,并且应该处理此问题。