Last active
January 3, 2016 13:09
-
-
Save cdl/8468023 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| answerLabel = [[UILabel alloc] initWithFrame:CGRectMake(35.0f, 132.0f, 260.0f, 54.0f)]; | |
| answerLabel.font = [UIFont fontWithName:@"AvenirNext-DemiBold" size:45.0f]; | |
| answerLabel.textAlignment = NSTextAlignmentRight; | |
| answerLabel.numberOfLines = 1; | |
| answerLabel.minimumScaleFactor = 8./answerLabel.font.labelFontSize; | |
| answerLabel.text = @"BASKETBALL"; | |
| /* | |
| * Failing on line 7 - error: | |
| * Property 'labelFontSize' not found on object of type 'UIFont *' | |
| */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
labelFontSize is a class method, not an instance method. Here's the documentation: https://developer.apple.com/library/ios/documentation/uikit/reference/UIFont_Class/Reference/Reference.html#//apple_ref/occ/clm/UIFont/labelFontSize. Basically you'd just replace
answerLabel.font.labelFontSizewith[UIFont labelFontSize]