<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>ch3cooh393</author_name>
  <author_url>https://blog.hatena.ne.jp/ch3cooh393/</author_url>
  <blog_title>アプリ開発の逆引き辞典</blog_title>
  <blog_url>https://recipe.ch3cooh.net/</blog_url>
  <categories>
    <anon>SwiftUI</anon>
    <anon>SwiftUI-トラブル</anon>
  </categories>
  <description>正方形の形のViewを作成できなかった。どうすればよいのか？ 実行環境 Xcode 11.6 iOS 13.6 問題の挙動 横いっぱいの正方形のViewを表示したい。具体的には下図のようにしたい。 横いっぱいにするには .frame(maxWidth: .infinity) を指定すれば良い。 import SwiftUI struct HomeView : View { var body: some View { NavigationView { VStack { ZStack { Text(&quot;ねこa&quot;) Text(&quot;いぬ&quot;) } .frame(maxWidth: .infinity) .b…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Frecipe.ch3cooh.net%2Fentry%2Fswiftui%2Fview%2Fcant_display_square_view&quot; title=&quot;SwiftUIで 正方形のViewを表示できない - アプリ開発の逆引き辞典&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/c/ch3cooh393/20200721/20200721230448.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-07-21 23:48:35</published>
  <title>SwiftUIで 正方形のViewを表示できない</title>
  <type>rich</type>
  <url>https://recipe.ch3cooh.net/entry/swiftui/view/cant_display_square_view</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
