Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix deprecations of sizeWithFont for ios 7 #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

fix deprecations of sizeWithFont for ios 7 #40

wants to merge 1 commit into from

Conversation

ioboi
Copy link

@ioboi ioboi commented Nov 3, 2013

now the code doesn't have any deprecation warnings for ios 7.
i think it would be fine if you create a branch or tag for ios < 7.

cheers :)

@instantkaffee
Copy link

    CGSize size = [label sizeWithAttributes: @{NSFontAttributeName: self.labelFont}];

evanpurkhiser added a commit to evanpurkhiser/CS-Extra-Credits that referenced this pull request Nov 22, 2013
@sketchytech
Copy link

Firstly, excellent work. Thanks very much for contributing this code. In iOS 7 the sizeWithFont warning can be fixed with the following code:

sizeWithAttributes:[[self.labelFont fontDescriptor] fontAttributes]

Not suitable for earlier versions of iOS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants