jueves, 14 de mayo de 2015

Incrementar el intercalado entre líneas. NSMutableParagraphStyle. Increase sandwiched between lines.

+ (NSMutableAttributedString *) InterlineadoTexto:(NSString *) textoIn espacio:(int)espacio
{
    
    NSString *textViewText = textoIn;
    
    NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:textViewText];
    NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle alloc] init];
    paragraphStyle.alignment = NSTextAlignmentJustified;
    paragraphStyle.lineSpacing = espacio;
    NSDictionary *dict = @{NSParagraphStyleAttributeName : paragraphStyle };
    [attributedString addAttributes:dict range:NSMakeRange(0, [textViewText length])];
    
    return attributedString;
    

}

No hay comentarios:

Publicar un comentario