<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>rils_k</author_name>
  <author_url>https://blog.hatena.ne.jp/rils_k/</author_url>
  <blog_title>まだどこにもないアプリを作る</blog_title>
  <blog_url>https://rils-k.hatenablog.com/</blog_url>
  <categories>
    <anon>Swift</anon>
    <anon>SwiftUI</anon>
    <anon>Xcode</anon>
  </categories>
  <description>&lt;読者の想定&gt; Coredataを使ってアプリを作成しており 最初にCoreDataを使うにチェックを入れてアプリを作成し、それを元にアプリを作成している人に向けて書いております。 private var items: FetchedResults&lt;Item&gt; items.sortDescriptors = [SortDescriptor(\Item.timestamp, order: .reverse)] itemsはFetchResultsです 上記であればtimestampの日付順で降順に並び替えることができます。 動的に変更するコードはあまりネット上になかったのでなかなか苦労しました。…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frils-k.hatenablog.com%2Fentry%2F2022%2F03%2F05%2F132612&quot; title=&quot;【SwiftUI】CoreData SortDescriptor を動的に使う。fetchResultsを動的に並び替える,ボタンを押したら並び替える - まだどこにもないアプリを作る&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/r/rils_k/20220305/20220305132049.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-03-05 13:26:12</published>
  <title>【SwiftUI】CoreData SortDescriptor を動的に使う。fetchResultsを動的に並び替える,ボタンを押したら並び替える</title>
  <type>rich</type>
  <url>https://rils-k.hatenablog.com/entry/2022/03/05/132612</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
