Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Xcode 16のPreviewModifierと@Previewableを活用した効率的なプ...

ojun
July 05, 2024

Xcode 16のPreviewModifierと@Previewableを活用した効率的なプレビュー方法の考察

ojun

July 05, 2024
Tweet

More Decks by ojun

Other Decks in Programming

Transcript

  1. @Previewable ΍ PreviewModifier Λར༻͠ղܾ͢Δ .task {} ΋͘͠͸ .onAppear {} Λ

    ར༻ͦ͠ͷதͰಡΈࠐΈΛߦ͏ decode ͕੒ޭͨ͠Βɺposts ʹ୅ೖ ͢Δ
  2. ·ͱΊ Xcode 16͔ΒPreviewModi fi er ͱ @Previewable ͕௥Ճ͞Εͨ ͜ΕΒΛར༻͢Δ͜ͱͰ Preview

    ͷମݧ͕ΑΓ޲্͢Δ JSONϑΝΠϧΛར༻͠ΤϯςΟςΟΛ஫ೖ͢Δ͜ͱͰগ͠ͷίʔυͰଟྔͷύλʔϯΛ Preview Ͱ֬ೝ͢Δ͜ͱ͕Մೳ