title: iOS7 - How to underline a UITextField
body: <p>I have looked at (and tried the code snippets) <a href="https://stackoverflow.com/questions/12423776/make-text-underlined-in-xcode">this question</a>, but wonder if something has come up in iOS7? More likely, I'm doing something wrong.</p>
  
  <p>My code is as follows:</p>
  
  <pre><code>import &lt;CoreText/CoreText.h&gt;
  
      NSString *tempString1 = [currentMemory valueForKey:@"title"];
  
      NSMutableAttributedString *attString = [[NSMutableAttributedString alloc] initWithString:tempString1];
          [attString addAttribute:(NSString*)kCTUnderlineStyleAttributeName
                      value:[NSNumber numberWithInt:kCTUnderlineStyleSingle]
                      range:(NSRange){0,[attString length]}];
          self.titleLabel.attributedText = attString;
          self.titleLabel.textColor = [UIColor whiteColor];
  </code></pre>
  
  <p>I'm getting this compile error:</p>
  
  <blockquote>
    <p>*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'NSConcreteMutableAttributedString initWithString:: nil value'</p>
  </blockquote>
  
  <p>If I use plain text</p>
  
  <pre><code>self.titleLabel.text = [NSString stringWithFormat:@"%@", tempString1];
  </code></pre>
  
  <p>it works fine. Any help appreciated.</p>