6
Ich habe einen Ellipsenpfad für Text. Für Füllpfad verwendet i NSMutableAttributedString:NSMutableAttributedString vertikale Ausrichtung
UIFont *font = [UIFont fontWithName:@"font name" size:15];
NSMutableParagraphStyle *mutParaStyle=[[NSMutableParagraphStyle alloc] init];
[mutParaStyle setAlignment:NSTextAlignmentCenter];
[mutParaStyle setLineBreakMode:NSLineBreakByWordWrapping];
NSDictionary *attrsDictionary = [NSDictionary dictionaryWithObjectsAndKeys:font
,NSFontAttributeName,mutParaStyle ,NSParagraphStyleAttributeName,nil];
NSMutableAttributedString *strText = [[NSMutableAttributedString alloc] initWithString:text attributes:attrsDictionary];
Aber diese Arbeit nur für die horizontale Textausrichtung. Wie kann ich vertikale Ausrichtung anwenden?
ich dieses Ergebnis haben:
Aber ich brauche diese:
Ich habe die Frage aktualisiert vielleicht jetzt wird klarer –