title: NSTextAlignmentCenter and NSTextAlignmentRight are the wrong way round in NSTextTab?
body: <p>Can anyone please check something for me... Just to make sure I'm not going mad!</p>
  
  <p>I created an <code>NSMutableParagraphStyle</code> with <code>tabStops</code>, but they weren't appearing where I was expecting:</p>
  
  <pre><code>float width = self.myLabel.frame.size.width;
  self.tabStyle.tabStops = @[[[NSTextTab alloc] initWithTextAlignment:NSTextAlignmentRight location:width - 50 options:nil],
                              [[NSTextTab alloc] initWithTextAlignment:NSTextAlignmentRight location:width options:nil]];
  </code></pre>
  
  <p>Then I created a convenience method to create an attributed string with the tab positions for two strings:</p>
  
  <pre><code>- (NSAttributedString *)tabbedTextWithFirstString:(NSString *)firstString secondString:(NSString *)secondString
  {
      NSDictionary *attributes = @{NSFontAttributeName:[UIFont fontWithName:kHSTFontFaceDefault size:14.0]};
  NSString *tabbedStr = [NSString stringWithFormat:@"\t%@\t", firstString];
      NSMutableAttributedString *attrStr = [[NSMutableAttributedString alloc] initWithString:tabbedStr attributes:attributes];
  
      attributes = @{NSFontAttributeName:[UIFont fontWithName:kHSTFontFaceDefaultBold size:14.0]};
      [attrStr appendAttributedString:[[NSAttributedString alloc] initWithString:secondString attributes:attributes]];
  
      [attrStr addAttribute:NSParagraphStyleAttributeName value:self.tabStyle range:NSMakeRange(0, attrStr.length)];
      return attrStr;
  }
  </code></pre>
  
  <p>This was being applied to two separate <code>UILabel</code>s that appear one on top of the other. When I ran the code, inserting the text, the first string looked <em>center</em> aligned, and the second string was being cut off the end of the label:</p>
  
  <p><img src="https://i.stack.imgur.com/uPusk.png" alt="enter image description here"></p>
  
  <p>So then I changed <code>NSTextAlignmentRight</code> for <code>NSTextAlignmentCenter</code>, and <em>now they are right aligned correctly!</em></p>
  
  <p><img src="https://i.stack.imgur.com/FOH29.png" alt="enter image description here"></p>
  
  <p>I know I have solved my issue, but since there appears to be a mistake in the iOS framework, I don't want the app to break if and when Apple fix this issue. So if anyone could tell me if it is indeed wrong, or if I am actually mistaken, I'd be very grateful, thanks!</p>