I’m trying to sort an array of NSStrings but i’m unsure how to actually pass parameters into the @selector method. Here is why I’m trying to do
//After the optional: id like to pass a UITextField.text but not sure how.
NSArray *sortedSection = [wordSection sortedArrayUsingSelector:@selector(sortValue:optional:)];
Here is the method I’m attempting to use.
- (NSComparisonResult) sortValue:(NSString *)otherString optional:(NSString *)otherLetters;
Any help is greatly appreciated.
would this help?
didn’t really understand what is in wordSection, what you like to sort and what will be in the UITextField.text