title: How set UILabel maximum length?
body: <p>My label shows one field of web service.I want to display 10 characters of my label.My code is not working.</p>
  
  <p>In didEndElement code :</p>
  
  <pre><code>  if ([elementName isEqualToString:@"StationName"] ) {
        StationName.text = retornoSOAP;
        returnSOAP = nil;
        tReturn = NO;    
    }
  </code></pre>
  
  <p>This code is working.It displays StationName field to StationName label</p>
  
  <p>Where is my mistake here ?</p>
  
  <pre><code>  - (void)viewDidUnload {
           *NSString *temp =@"                                  ";
  
              if ([temp length] &gt; 10) {
                NSRange range = [temp rangeOfComposedCharacterSequencesForRange:(NSRange){0, 10}];
                temp = [temp substringWithRange:range];
              }
  
               StationName.text= temp;
      }
  </code></pre>