4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

データクラスで作成したデータを日付(最新)順にソートする方法

Posted at

こちらの記事を参考にして理解することが出来ました。
http://detail.chiebukuro.yahoo.co.jp/qa/question_detail/q10119378300

要するに
・配列変数(NSArray)
・Dataクラス変数

を用意して

NSSortDescriptor* sortDesc = [NSSortDescriptor sortDescriptorWithKey:@"日付指定文字列" ascending:YES];

配列変数 = [Dataクラス変数 sortedArrayUsingDescriptors:@[sortDesc]];

をして上げれば良いのでした。。

RSSアプリなんかを作る時にはこの処理が重要になりますね。
これで納得。

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?