title: Initializing NSArray *_strong with an expression of incompatible type void
body: <p>I referred <a href="https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/SortDescriptors/Articles/Creating.html" rel="nofollow">this</a> link as I am trying to sort the data from web service in table View. My first question is can we sort data in a mutable array? I get this compiler error in the following code.</p>
  
  <pre><code>NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"Name" ascending:YES];
  NSArray *sortArrayWithObject = [NSArray arrayWithObject:sortDescriptor];
  NSArray *sortedArray = [tempArray sortUsingDescriptors:sortArrayWithObject]; // error
  </code></pre>
  
  <p><code>tempArray</code> is <code>NSMutableArray</code> and not <code>NSArray</code>. </p>