title: NSAttributed string in multiple lines in a UILabel
body: <p>I have a <code>UILabel</code> inside a cell which contains several elements. I need the label to have attributed string which can fill the label's height, i.e. go into multiple lines if neccessary. I managed to achieve this and if I run the App on iOS7 it appears to be just fine(disregard the yellowish background color):</p>
  <p><img src="https://i.stack.imgur.com/ESMqM.png" alt="enter image description here" /></p>
  <p>Here is the setup of the UILabel:</p>
  <pre><code>NSMutableAttributedString *string = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@&quot;%@  %@&quot;, sender, content]];
  NSRange selectedRange = NSMakeRange(0, sender.length); // 4 characters, starting at index 22
  
  [string beginEditing];
  
  [string addAttribute:NSFontAttributeName
                 value:[AppereanceConfiguration fontMediumWithSize:18]
                 range:selectedRange];
  
  [string endEditing];
  
  self.notificationText.attributedText = string;
  </code></pre>
  <p>where self.notificationText is the UILabel that I'm talking about. In the xib file for the cell I've set the minimum font size to 3 and the number of lines to 0. As I said before, it works perfectly on iOS 7, but on iOS 6 for some reason it doesn't know how to do the word wrapping on it's own and it tries to &quot;Truncate Tail&quot; as this is the line break mode that has been set by default in the xib, resulting in a cell looking like this:</p>
  <p><img src="https://i.stack.imgur.com/FUZ3f.png" alt="enter image description here" /></p>
  <p>If I change the line break mode to Word Wrapping it crashes the app on iOS 6 saying that:</p>
  <blockquote>
  <p>NSAttributedString invalid for autoresizing, it must have a single spanning paragraph style (or none) with a non-wrapping lineBreakMode.</p>
  </blockquote>
  <p>How do I get this to work on iOS 6?</p>