【发布时间】:2014-03-11 22:37:18
【问题描述】:
我正在使用一个库 (SGInfoAlert),它使用已弃用的代码 drawInRect:r withFont:。 我尝试更改一些代码以在 iOS 7 中修复它,但文本没有显示。有谁知道为什么会这样?
// Changed this
//[info_ drawInRect:r withFont:[UIFont systemFontOfSize:kSGInfoAlert_fontSize]];
// To this
NSDictionary *textAttributes = @{NSFontAttributeName: [UIFont systemFontOfSize:kSGInfoAlert_fontSize]};
[info_ drawInRect:r withAttributes:textAttributes];
这里是 git 仓库https://github.com/sagiwei/SGInfoAlert
【问题讨论】:
标签: ios7 deprecated drawinrect