10.3 beta have Crash

hi, please help me. I met a crash:

code:

NSMutableAttributedString* loadingStr = [[NSMutableAttributedString alloc] initWithString:@"Loading..." attributes:[NSDictionary dictionaryWithObjects:@[NSForegroundColorAttributeName,NSFontAttributeName] forKeys:@[[UIColor blackColor],[UIFont systemFontOfSize:14.0f]]]];


UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(100, 100, 100, 100)];

[label setAttributedText:loadingStr];

crash:
[UICTFont isEqualToString:]: unrecognized selector sent to instance


thanks:)

Replies

Same issue for me. Been working on it today. Haven't found a solution so far.

Hmm. Looks like you mixed up the keys and values for your attributes dictionary. "NSFontAttributeName" and "NSForegroundColorAttributeName" should be keys, not objects. Likewise, "UIColor" and "UIFont" should be objects here, not keys. I think it's likely that this is causing the crash you're seeing.