Ho NSString e ho bisogno di fare NSAttributedString.Converti NSAattributedString in stringa e ritorno
NSString è qualcosa di simile:
bvcx b vcxbcvx bcxvbcxv bvx xbc bcvx bxcv bcxv bcxv bcxv bcvx bcvx bcxvbcvx bvc bcvx bxcv{
NSFont = "\"LucidaGrande 24.00 pt. P [] (0x108768a80) fobj=0x108788880, spc=7.59\"";
NSParagraphStyle = "Alignment 4, LineSpacing 0, ParagraphSpacing 0, ParagraphSpacingBefore 0, HeadIndent 0, TailIndent 0, FirstLineHeadIndent 0, LineHeight 0/0, LineHeightMultiple 0, LineBreakMode 0, Tabs (\n 28L,\n 56L,\n 84L,\n 112L,\n 140L,\n 168L,\n 196L,\n 224L,\n 252L,\n 280L,\n 308L,\n 336L\n), DefaultTabInterval 0, Blocks (null), Lists (null), BaseWritingDirection -1, HyphenationFactor 0, TighteningFactor 0.05, HeaderLevel 0";
}
E 'NSAttributedString in UTF-8. C'è un modo come farlo?
Stai cercando 'NSAttributedString * attrStr = [[NSAribributoString alloc] initWithString: @" foo "];'? –
No, ho bisogno di nsattributestring formattato. Thx per interesse. –
Quindi è possibile utilizzare 'NSMutableAttributedString' e aggiungere qualsiasi tipo di attributi che si desidera. –