0
我想對NSString的數組進行排序,但我不確定如何實際將參數傳遞給@selector方法。這就是爲什麼我試圖做使用具有兩個參數的自定義選擇器排序數組
//After the optional: id like to pass a UITextField.text but not sure how.
NSArray *sortedSection = [wordSection sortedArrayUsingSelector:@selector(sortValue:optional:)];
這是我試圖使用的方法。
- (NSComparisonResult) sortValue:(NSString *)otherString optional:(NSString *)otherLetters;
任何幫助,非常感謝。