मैंने अपने सॉर्ट कुंजी lastName
द्वारा डेटा को सफलतापूर्वक सॉर्ट किया है, लेकिन मैं जानना चाहता हूं कि lastName
, और फिर firstName
द्वारा सॉर्ट करना है। यहाँ कोड मैं द्वारा lastName
द्वितीयक NSSortDescriptor सॉर्ट कुंजी कैसे स्थापित करें?
NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"firstName" ascending:YES];
[request setSortDescriptors:[NSArray arrayWithObject:sortDescriptor]];
सॉर्ट करने के लिए मैं कैसे firstName
के माध्यमिक तरह कुंजी जोड़ सकता हूँ के लिए इस्तेमाल किया है?
खोज करने और यहां पूछने के बाद बस 2 सेकंड, यह सही समाधान है जो मैंने पाया। [यहां सूचीबद्ध] (http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/SortDescriptors/Concepts/Creating.html#//apple_ref/doc/uid/20001845-BAJEAIEE) – tarheel
समाधान है @tarheel चला गया। लिंक मर चुका है। – new2ios