Don't use sortedArrayUsingSelector:
. Instead, explicitly create the key array in the order that you want. Then, create tableContents
using that key array and another array created to hold all of your content arrays (using dictionaryWithObjects:forKeys:
).
NSArray *keys = @[ @"About", @"Payment Preferences", @"Profile & Preferences", @"Security" ];
NSArray *values = @[ arrTemp1, arrTemp2, arrTemp3, arrTemp4 ];
self.tableContents = [NSDictionary dictionaryWithObjects:values forKeys:keys];
self.sortedKeys = keys;