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

iOS7 compability #56

Open
bangedorrunt opened this issue Sep 17, 2013 · 1 comment
Open

iOS7 compability #56

bangedorrunt opened this issue Sep 17, 2013 · 1 comment

Comments

@bangedorrunt
Copy link

Current version is not working with iOS7, the view is showed up behind navigation bar, not the bottom
and I see the following depreciation message
/UILabel+WBExtensions.m:40:37: 'sizeWithFont:forWidth:lineBreakMode:' is deprecated: first deprecated in iOS 7.0 - Use -boundingRectWithSize:options:attributes:context:

@paulwalton
Copy link

Replace that line with the following code:

NSAttributedString *attributedText =[[NSAttributedString alloc] initWithString:textTest attributes:@{NSFontAttributeName: self.font}];
    CGRect rect = [attributedText boundingRectWithSize:(CGSize){1024.0, CGFLOAT_MAX}options:NSStringDrawingUsesLineFragmentOrigin context:nil];
    CGSize sizeTest = rect.size;

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

No branches or pull requests

2 participants