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.
配列内のデータのリストがあります。
その配列のデータをテーブルビューで表示するコードを実装しました。
正常に表示する次に、アルファベット順とセクションで次のようにデータを表示する必要があります。
どうすればこれを達成できますか?
ソート使用:-
NSSortDescriptor *sortParam= [NSSortDescriptor sortDescriptorWithKey:@"name" ascending:YES]; [yourArray sortUsingDescriptors:[NSArray arrayWithObject:sortParam]];
viewdidloadテーブルに割り当てる前に並べ替えます。
viewdidload