i'm running strange problem uilabel text center-justified , attributed text has background color...
on linebreaks, background color drawn label's edge first character, not behind characters. solvable problem - can make background color appear behind actual text?
actual behavior (arrows pointing places should white): 
desired behavior (from affinity designer) 
and curious, code:
- (void)viewdidload { [super viewdidload]; // additional setup after loading view, typically nib. nsstring *texttouse = @"lorem ipsum dolor sit amet, consectetur adipiscing elit. vestibulum id malesuada diam. ut eget odio libero. sed urna elit, vestibulum et felis consequat, porta bibendum lorem"; nsdictionary *descriptionattr = @{ nsforegroundcolorattributename : [uicolor blackcolor], nsbackgroundcolorattributename : [uicolor yellowcolor], }; self.attrlabel.attributedtext = [[nsattributedstring alloc] initwithstring:texttouse attributes:descriptionattr]; }
Comments
Post a Comment