title: sortedArrayUsingComparator in sorting array contains object with 2 numbers
body: <p>iam trying to sort a object with 2 numbers using the api sortedArrayUsingComparator </p>
  
  <pre><code>array1= [array sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) {
  
      person *p1 = (person*)obj1;
      person *p2 = (person*)obj2;
  
      if (p1.value&gt;p2.value &amp;&amp; p1.age&gt;p2.age)
      {
          return (NSComparisonResult)NSOrderedAscending;
      }
      else
          return (NSComparisonResult)NSOrderedDescending;
  }];
  </code></pre>
  
  <p>i want to make code to sort something like this ,,,,</p>
  
  <pre><code>input : 0  1
          1  2
          0  9
          1  4
          2  3
  
  output: 0  1
          0  9
          1  2
          1  4 
          2  3
  </code></pre>