AliSoftware / AliSoftware/OHAttributedLabel

NSMutableAttributedString setFont functions crash with iOS 6 drawing functions

Abierto
#89 6 comentarios 0 reacciones 0 asignados Ver en GitHub
Apple Bug
Lenguaje dominante
Objective-C
Estrellas
1.5k
Forks
341
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.