You are using the NSMutableAttributedString
in wrong way I assume, it should be used as under,
NSMutableDictionary *a = [[NSMutableDictionary alloc] init];
[a setObject:[NSNumber numberWithInt:1] forKey:NSStrikethroughStyleAttributeName];
NSMutableAttributedString *b = [[NSMutableAttributedString alloc] initWithString:@"abcd" attributes:a];
self.label.attributedText = b;
after trying the above code, you should get the UILabel output like I have showed in image
but if you want to set the attribute separately then you should do like this
[b addAttribute:ATTRIBUTENAME value:VALUE range:RANGE];
for example setting attribute for background color
[str addAttribute:NSBackgroundColorAttributeName value:[UIColor yellowColor] range:NSMakeRange(2,4)];