Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
NSStringsを含むNSMutableArrayがあり、アルファベット順に並べ替えたいのですが、難しいことではないようですが、適切な解決策は見つかりませんでした。お願い助けて。
比較セレクターとしてのsortUsingSelector:メソッドの使用:compare:
sortUsingSelector:
compare:
NSMutableArray* strings = [NSMutableArray arrayWithObjects:@"dog", @"ant", @"cat",nil]; [strings sortUsingSelector:@selector(compare:)]; NSLog(@"%@", strings);