iphone: why my in-app purchase product array object index set automatically in alphabetical order

I am working on in-app purchase task in app I done all work currently but I need one help that my product array display in UITableview with sorting in alphabetical but I need display as same a my productIdentifiers how can I do this stuff please help

My issue example below:-

I set my product productIdentifiers like

- (id)init 
   NSSet *productIdentifiers = [NSSet setWithObjects:

    if ((self = [super initWithProductIdentifiers:productIdentifiers])) 


    return self;

and in tableview data display on cell alphabetical sorting with a b c d h s

but i need it display as same as productIdentifiers like c d a s b h

Please help.


Expanding on Adam's comment above, if you are trying to display data from a collection class in a table view, you should use an array as the data source, not a set. This is because the objects contained within an NSArray are automatically ordered, based on how the objects are placed into the array, and so will come out in that order. With an NSSet the contents are unordered and thus will come out in any order.

Take a look at Apple's Values and Collections document, which gives details of the three main types of collection class available in Cocoa: NSArray, NSSet and NSDictionary.

Need Your Help

Unable to change select options populated via jQuery

jquery select option

I have a few drop down menus that, when the right combination of values is selected, another drop down is populated. However, once the third drop down is populated, I'm unable to change the selecti...

Metro interface in Android applications

android microsoft-metro

I am a beginner in Android programming.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.