nicklockwood / FXLabel

[DEPRECATED]
http://charcoaldesign.co.uk/source/cocoa#fxlabel
Other
816 stars 125 forks source link

FXLabel does not support attributedStrings ? #26

Open enapos opened 9 years ago

enapos commented 9 years ago

I love this pod, but unfortunately I cannot get it to work with attributed strings. :( This is what i want to do: FXLabel *myLabel = [[FXLabel alloc] init];

UIFont *fnt = [UIFont fontWithName:@"Helvetica" size:20.0];

NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:@"GGG®GGG" attributes:@{NSFontAttributeName: [fnt fontWithSize:20]}]; [attributedString setAttributes:@{NSFontAttributeName : [fnt fontWithSize:10] , NSBaselineOffsetAttributeName : @10} range:NSMakeRange(3, 1)];

myLabel.attributedText = attributedString;

nicklockwood commented 9 years ago

Unfortunately, FXLabel pre-dates Apple adding attributed string support to UILabel, and it would be very complex to add it retrospectively.