title: How to sort NSArray?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/1351182/how-to-sort-a-nsarray-alphabetically">How to sort a NSArray alphabetically?</a>  </p>
  </blockquote>
  
  
  
  <p>I am using below code to load data into UITableView from NSArray.</p>
  
  <p>How can I sort them in alphabetical order ? 
  Mine is <code>NSArray</code> not <code>NSMutableArray</code> nor I am using <code>Dictionary</code></p>
  
  <pre><code>defaultVot = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:pathToVot error:&amp;error];
  
  NSString *fileName = [[defaultVot objectAtIndex:indexPath.row-1] lastPathComponent];
  
  NSString *filenameWithoutExtension = [fileName substringToIndex:[fileName length] -4];
  
  cell.textLabel.text = filenameWithoutExtension;
  </code></pre>