<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ayumu-nishimura</author_name>
  <author_url>https://blog.hatena.ne.jp/ayumu-nishimura/</author_url>
  <blog_title>Yappli Tech Blog</blog_title>
  <blog_url>https://tech.yappli.io/</blog_url>
  <categories>
    <anon>SwiftUI</anon>
    <anon>iOS</anon>
  </categories>
  <description>こんにちは、iOSエンジニアの西村です。 今回は、SwiftUIのLazyVGridを使って画面回転に応じてカラム数を変更する処理を実装したいと思います。 縦画面（2列での表示） 横画面（4列での表示） LazyVGridで絵文字を表示する まずは、LazyVGridを使用してUnicodeと絵文字をそれぞれ2列で表示してみました。 コードは、LazyVGridのドキュメントにサンプルとして掲載されているものをそのまま使用しています。 developer.apple.com このコード内でカラム数を定義しているのは、2行目のcolumns変数です。この変数でGridItemの数を増やすと、それ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftech.yappli.io%2Fentry%2Fchange-number-of-columns&quot; title=&quot;画面回転でLazyVGridのカラム数を変更する - Yappli Tech Blog&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/a/ayumu-nishimura/20240627/20240627025902.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2024-06-28 13:46:48</published>
  <title>画面回転でLazyVGridのカラム数を変更する</title>
  <type>rich</type>
  <url>https://tech.yappli.io/entry/change-number-of-columns</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
