Cómo calcular la altura de una NSAttributedString con un ancho determinado en iOS 6 [duplicado]

Posible duplicado:
Cómo obtener la altura para NSAttributedString en un ancho fijo

Ahora NSAttributedString está disponible en iOS 6. Para fines de diseño, quiero saber cómo calcular la altura requerida de una NSAttributedString con un ancho fijo. Estoy buscando algo que sea equivalente al de NSString.- (CGSize)sizeWithFont:(UIFont *)font constrainedToSize:(CGSize)size pero para NSAttributedString.

Para calcular el tamaño de dibujo de NSAttributedStrings, hay dos métodos disponibles:

- (CGSize)size No se puede utilizar porque no tiene en cuenta ningún ancho.Lo intenté- (CGRect)boundingRectWithSize:(CGSize)size options:(NSStringDrawingOptions)options context:(NSStringDrawingContext *)context, pero de alguna manera no me da la altura correcta. Creo que el método es buggy. Si ejecuto el siguiente código, me dabounding size: 572.324951, 19.000000 ignorando el ancho dado de 200. Debería darme algo así como 100 de altura.
    NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] init];
    NSDictionary *attributes = @{NSFontAttributeName : [UIFont fontWithName:@"HelveticaNeue" size:15], NSForegroundColorAttributeName : [UIColor blueColor]};
    [attributedString appendAttributedString:[[NSAttributedString alloc] initWithString:@"Attributed String\n" attributes:attributes]];
    [attributedString appendAttributedString:[[NSAttributedString alloc] initWithString:@"Attributed String\n" attributes:attributes]];
    [attributedString appendAttributedString:[[NSAttributedString alloc] initWithString:@"Attributed String\n" attributes:attributes]];
    [attributedString appendAttributedString:[[NSAttributedString alloc] initWithString:@"Attributed String\n" attributes:attributes]];
    [attributedString appendAttributedString:[[NSAttributedString alloc] initWithString:@"Attributed String\n" attributes:attributes]];

    CGRect frame = [attributedString boundingRectWithSize:CGSizeMake(200, 1000) options:0 context:nil];
    NSLog(@"bounding size: %f, %f", frame.size.width, frame.size.height);

Hay otros métodos disponibles para Mac OS X, pero no para iOS.

Respuestas a la pregunta(1)

Su respuesta a la pregunta