title: sortedArrayUsingSelector what is it doing?
body: <p>I am still new to objective-c and am trying to figure out what this statement is doing exactly.</p>
  
  <pre><code>[names allKeys] sortedArrayUsingSelector:@selector(compare:)];
  </code></pre>
  
  <p>I know that <code>allKeys</code> is getting all the keys from my dictionary. I know that <code>sortedArrayUsingSelector</code> is sorting my array im creating. Then im calling the compare method, that is where I am lost what is this doing? From the document on apple it says that "Returns an NSComparisonResult value that indicates whether the receiver is greater than, equal to, or less than a given number." I dont understand how it is sorting based of that method.</p>