title: Fixing NSAttributedString background color on center-justified text
body: <p>I'm running into a strange problem with a UILabel whose text is center-justified and the attributed text has a background color...</p>
  
  <p>On linebreaks, the background color is drawn from the label's edge to the first character, not just behind the characters. Is this a solvable problem - that I can make the background color appear only behind the actual text?</p>
  
  <p><strong>Actual behavior</strong> (arrows pointing to places that should be white):
  <img src="https://i.stack.imgur.com/PwUWn.png" alt="enter image description here"></p>
  
  <p><strong>Desired behavior</strong> (from Affinity Designer)
  <img src="https://i.stack.imgur.com/ObYXs.png" alt="enter image description here"></p>
  
  <hr>
  
  <p>And for the curious, the code:</p>
  
  <pre><code>- (void)viewDidLoad {
  [super viewDidLoad];
  // Do any additional setup after loading the view, typically from a 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];
  
  }
  </code></pre>