title: Sorting NsMutable Array
body: <p>I am getting floor names and storing in <code>_floorNames (NSMutableArray)</code> by using</p>
  
  <pre><code>_floorNames=[conferenceHall floorDetails:office];
  
  
  NSLog(@"floor names=%@",_floorNames);
  </code></pre>
  
  <p>This will print floor names like this.</p>
  
  <pre><code> GROUND,
   THIRD,
   FIRST,
   SECOND
  </code></pre>
  
  <p>Now i want to sort that floor names NsMutableArray as </p>
  
  <pre><code>GROUND,
  FIRST,
  SECOND,
  THIRD
  </code></pre>
  
  <p>I have used </p>
  
  <pre><code> NSSortDescriptor *aa=[[NSSortDescriptor alloc]initWithKey:floor ascending:YES                                                           selector:@selector(localizedCaseInsensitiveCompare:)];
  
   NSArray *descriptors = [NSArray arrayWithObjects:aa, nil]; 
     a = [array sortedArrayUsingDescriptors:descriptors];
  </code></pre>
  
  <p>But it will crash my application.
  Any suggestions ...</p>