0

パーサーから取得した名前のリストを表示する必要があります。リストの NSMutable 配列を取得しているので、アルファベット順に表示する必要があります。

私は次のように与えられたことをやってみました:

NSArray *myArtistArray=[[NSArray alloc]init];
myArtistArray=[artistsList sortUsingSelector:@selector(compare:) ];

// error void value not ignored as it outght to be
[myArtistArray sortedArrayUsingSelector:@selector(compare:)];
4

4 に答える 4

9
[yourMutableArray sortUsingSelector:@selector(compare:)];
[yourArray sortedArrayUsingSelector:@selector(compare:)];
于 2010-04-16T05:42:08.683 に答える
4
[yourMutableArray sortUsingSelector:@selector(localizedCaseInsensitiveCompare:)];
于 2010-04-16T10:20:15.730 に答える
2
[yourArrayName sortUsingSelector:@selector(localizedCaseInsensitiveCompare:)];
于 2013-11-18T08:15:56.917 に答える