title: Sorting items In NSDictionary
body: <p>I am reading the items from plist into dictionary, i am using keys of dictionary to set title and value as tag to the buttons. now i have to sort the items in the dictionary, i don't want to put sorted items into array, as i am using dictionary to set title and tag for the button. I checked the links but most of them are putting sorted items into array. How can i do it with out using array , and instead use same dictionary.
  here is code snippet. </p>
  
  <pre><code>while (key = [keyEnumerator nextObject])
  {
      UIButton *btnWith = [UIButton buttonWithType:UIButtonTypeRoundedRect];
      btnWith.tag = [[topics objectForKey:key] integerValue] ;
      [btnWith setTitle:key forState:UIControlStateNormal];
      btnWith.titleLabel.font = [UIFont fontWithName:@"Aller-Light" size:15];
      [btnWith setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
      btnWith.contentHorizontalAlignment = UIControlContentHorizontalAlignmentLeft;
      [btnWith setBackgroundImage:[UIImage imageNamed:@"unchecked.png"] forState:UIControlStateNormal];
      [btnWith addTarget:self action:@selector(CheckboxClicked:) forControlEvents:UIControlEventTouchUpInside];
      [self.scrollview setContentSize: CGSizeMake(320, topics.count *50)];
  
  }
  </code></pre>