Je travaille sur un format de chaîne attribué. Je dois ajouter une suppression dans la chaîne NSMutableAttributed existante. Est-il possible dans l'exemple donné ci-dessous.Ajouter un attribut dans une chaîne NSMutableAttributed existante
First Task For Bhasin
30 Jun 2017 12:05 PM till 30 Jun 2017 01:05 PM{
NSBackgroundColor = "<CGColor 0x6100000934c0> [<CGColorSpace 0x6080000303c0> (kCGColorSpaceICCBased; kCGColorSpaceModelMonochrome; Generic Gray Gamma 2.2 Profile; extended range)] (0 0)";
NSColor = "<CGColor 0x6180002a2ac0> [<CGColorSpace 0x610000230920> (kCGColorSpaceICCBased; kCGColorSpaceModelRGB; sRGB IEC61966-2.1; extended range)] (1 0 0 1)";
NSFont = "<UICTFont: 0x7fac5476a0b0> font-family: \"Helvetica\"; font-weight: normal; font-style: normal; font-size: 15.00pt";
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 (\n), Lists (\n), BaseWritingDirection -1, HyphenationFactor 0, TighteningForTruncation NO, HeaderLevel 0";
}
Toute aide sera appréciée
Ajoutez le code de 'attributedString' – Subramanian
@Subramanian, j'utilise DAAttributedStringFormatter. Je souhaite ajouter une suppression – gurmandeep
Ajoutez la réponse pour convertir 'NSAttributedString' en' NSMutableAttributedString' et en ajoutant l'attribut strike through. – Subramanian