6

我已将我的 XCode 5 升级到 6,但不幸的是,调试器突然停止或此时出现异常,没有断点。请参阅下图了解更多详情。

在此处输入图像描述

在此处输入图像描述

这是我使用的示例代码,在以前的版本上运行很好。这有什么问题,我应该怎么做才能避免这种异常?

UIFont *font = [UIFont fontWithName:@"HelveticaNeue-Bold" size:20.0f];
NSMutableParagraphStyle *paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
paragraphStyle.lineBreakMode = NSLineBreakByWordWrapping;
paragraphStyle.alignment = NSTextAlignmentCenter;

NSDictionary *attributes = @{ NSFontAttributeName: font, NSParagraphStyleAttributeName: paragraphStyle };

[@"Hello" drawInRect:CGRectMake(118, 32, 375, 24) withAttributes:attributes];
4

0 回答 0