AliSoftware / AliSoftware/OHAttributedLabel

NSMutableAttributedString setFont functions crash with iOS 6 drawing functions

オープン
#89 コメント 6 件 リアクション 0 件 担当者 0 名 GitHub で見る
Apple Bug
主要言語
Objective-C
スター
1.5k
フォーク
341
PR マージ指標
30日以内にマージされた PR はありません

説明

Just a heads-up.

NSAttributedStrings with the font attribute set using the old Core Text functions (which the methods in the NSAttributedString attributes category included with this project use), when drawn using the new iOS 6 NSAttributedString drawing functions, will crash.

```
NSMutableAttributedString* foo = [NSMutableAttributedString attributedStringWithString:@"foo"];
[foo setFontName:@"Helvetica" size:13];
[foo boundingRectWithSize:CGSizeMake(320, 50) options:0 context:nil]; // CRASH
```

It appears that Apple assumed that the attribute value would be a UIFont object, when the documentation for the Core Text font attribute (still) says that it needs to be a CTFont object.

Although this is an iOS bug and not you guys' fault, you should probably still keep this in mind.

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。