Open BlakeLucchesi opened 9 years ago
I get that too... and this text drawing code looks strange to me... I don't see the point in getting the fontSize return value at that point, especially if it's going to go unused.
//// Text Drawing
int fontSize = size.width;
UIFont *font = [UIFont fontWithName:kFontAwesomeFamilyName size:fontSize];
@autoreleasepool {
UILabel *label = [UILabel new];
label.font = font;
label.text = textContent;
fontSize = fa_constraintLabelToSize(label, size, 500, 5);
font = label.font;
}
I found a build error while doing an "Analyze" build in my project. The
fontSize
variable gets assigned a value but is never used inside the method. I'm assuming this was supposed to get set as one of the attributes in the call to -drawInRect:withAttributes but I am not sure so I didn't create a PR with any changes.