{"id":1375,"date":"2020-08-21T22:32:58","date_gmt":"2020-08-21T13:32:58","guid":{"rendered":"http:\/\/hirlab.net\/nblog\/?p=1375"},"modified":"2020-08-25T11:00:01","modified_gmt":"2020-08-25T02:00:01","slug":"%e3%80%90%e7%ac%ac1%e5%9b%9e%e3%80%91%e6%97%a5%e6%9c%ac%e8%aa%9e%e7%89%88swiftui%e3%83%81%e3%83%a5%e3%83%bc%e3%83%88%e3%83%aa%e3%82%a2%e3%83%ab%e3%80%90%e5%9f%ba%e6%9c%ac%e8%a6%81%e7%b4%a0%e3%82%92","status":"publish","type":"post","link":"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1375\/","title":{"rendered":"\u3010\u7b2c1\u56de\u3011\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3010\u57fa\u672c\u8981\u7d20\u3092\u5b66\u3076\u3011"},"content":{"rendered":"<h2>\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1379\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/0.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"624\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/0.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/0-300x156.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/0-768x399.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/0-1024x532.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u672c\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306f\uff0c<a href=\"https:\/\/developer.apple.com\/tutorials\/swiftui\/\" target=\"_blank\" rel=\"noopener noreferrer\">Apple\u304c\u63b2\u8f09\u3057\u3066\u3044\u308b\u516c\u5f0f\u306eSwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb<\/a>\u3092\u300c\u65e5\u672c\u8a9e\u3067\u300d\u305d\u3057\u3066\u300c\u8a73\u7d30\u306b\u300d\u89e3\u8aac\u3057\u76f4\u3059\u3053\u3068\u3092\u76ee\u7684\u3068\u3057\u305f\u8a18\u4e8b\u3067\u3059\uff0e<\/p>\n<p>\u3053\u306e\u624b\u306e\u8a18\u4e8b\u306f\uff0c\u4ed6\u306b\u3082\u4f3c\u305f\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\u304c\uff0c\u5168\u3066\u3092\u7db2\u7f85\u3057\u3066\u3044\u308b\u308f\u3051\u3067\u306f\u306a\u304f\uff0c\u90e8\u5206\u7684\u306b\u89e3\u8aac\u3057\u3066\u3044\u308b\u8a18\u4e8b\u304c\u591a\u6570\u3067\u3059\uff0e<\/p>\n<p>\u305d\u3053\u3067\uff0cSwiftUI\u3092\u4f7f\u3063\u3066\u30a2\u30d7\u30ea\u958b\u767a\u3092\u3057\u305f\u3044\u65b9\u3005\u306e\u305f\u3081\u306b\uff0c\u305d\u3057\u3066\u52c9\u5f37\u3057\u3066\u3044\u308b\u81ea\u5206\u81ea\u8eab\u306e\u305f\u3081\u306b\uff0c<strong>\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306e\u5b8c\u5168\u7248<\/strong>\u3092\u66f8\u304d\u307e\u3059\uff0e<\/p>\n<p>\u306a\u304a\uff0c\u672c\u8a18\u4e8b\u306e\u96e3\u6613\u5ea6\u3068\u3057\u3066\u306f\uff0c\u521d\u7d1a\u8005\u3082\u898b\u69d8\u898b\u771f\u4f3c\u3067\u4f5c\u308c\u308b\u3088\u3046\u306b\u306f\u306a\u3063\u3066\u3044\u307e\u3059\u304c\uff0c<strong>\u305d\u308c\u3067\u306f\u7269\u8db3\u308a\u306a\u3044\u3068\u3044\u3046\u4e2d\u7d1a\u8005\u306e\u305f\u3081\u306b\uff0c\u7d30\u304b\u3044\u6587\u6cd5\u7684\u306a\u89e3\u8aac\u3082\u968f\u6240\u306b\u5165\u308c\u3066\u3044\u3053\u3046\u3068\u601d\u3044\u307e\u3059<\/strong>\uff0e<\/p>\n<p>\u6ce8\u610f\u3068\u3057\u3066\uff0c\u672c\u8a18\u4e8b\u306fSwift\u306e\u8a00\u8a9e\u89e3\u8aac\u306f\u3042\u307e\u308a\u542b\u307e\u306a\u3044\u306e\u3067\uff0c\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3092\u5225\u30bf\u30d6\u3067\u958b\u3044\u3066\u304a\u3044\u3066\uff0c\u5206\u304b\u3089\u306a\u3051\u308c\u3070\u9010\u4e00\u78ba\u8a8d\u3057\u3066\u307f\u308b\u3068\u826f\u3044\u3068\u601d\u3044\u307e\u3059\uff0e<\/p>\n<ol>\n<li><a href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1343\/\" target=\"_blank\" rel=\"noopener noreferrer\">Swift\u3092\u89e6\u3063\u305f\u3053\u3068\u304c\u306a\u3044\u30d7\u30ed\u30b0\u30e9\u30de\u30fc\u306e\u305f\u3081\u306eSwift\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb <i class=\"fas fa-external-link-alt\"><\/i><\/a><\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<p>\u3061\u306a\u307f\u306b\u51fa\u6765\u4e0a\u304c\u308b\u30a2\u30d7\u30ea\u306f\uff0c\u4e0a\u56f3\u306b\u793a\u3059\u3088\u3046\u306a<strong>\u89b3\u5149\u5730\u30a2\u30d7\u30ea<\/strong>\u3067\u3059\uff0e<\/p>\n<p>\u5404\u89b3\u5149\u5730\u306e\u4f4d\u7f6e\u60c5\u5831\u3092\u78ba\u8a8d\u3057\u305f\u308a\uff0c\u305d\u306e\u89b3\u5149\u5730\u3092\u304a\u6c17\u306b\u5165\u308a\u306b\u8ffd\u52a0\u3057\u305f\u308a\u3067\u304d\u308b\u30a2\u30d7\u30ea\u3092\u76ee\u6307\u3057\u307e\u3059\uff0e<\/p>\n<h2>\u7b2c1\u56de\uff1a\u57fa\u672c\u8981\u7d20\u3092\u5b66\u3076 ~\u30d3\u30e5\u30fc\u3092\u4f5c\u6210\u3057\uff0c\u7d44\u307f\u5408\u308f\u305b\u308b~<\/h2>\n<p>\u307e\u305a\u306f\uff0cSwiftUI\u3092\u4f7f\u3063\u3066\u30b7\u30f3\u30d7\u30eb\u306a\u30d3\u30e5\u30fc\u304b\u3089\u4f5c\u6210\u3057\u307e\u3059\uff0e<\/p>\n<p>\u4eca\u56de\u5b66\u3076\u3082\u306e\u306f\uff0c\u3069\u306e\u30a2\u30d7\u30ea\u3067\u3082\u5fc5\u305a\u3068\u8a00\u3063\u3066\u826f\u3044\u307b\u3069\u4f7f\u3046\u8d85\u91cd\u8981\u6a5f\u80fd\u3067\u3059\uff0e<\/p>\n<h3>Step 1. \u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u306e\u4f5c\u6210<\/h3>\n<p>\u307e\u305a\u306f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3092\u4f5c\u6210\u3057\u307e\u3057\u3087\u3046\uff0e<\/p>\n<p>Xcode\u3092\u7acb\u3061\u4e0a\u3052\u3066\uff0c<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1383\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-1-1.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1024\" height=\"602\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-1-1.png 1024w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-1-1-300x176.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-1-1-768x452.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>Create a new Xcode project\u3092\u9078\u629e\u3057\u307e\u3059\uff0e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1384\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-2.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1024\" height=\"625\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-2.png 1024w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-2-300x183.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-2-768x469.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>Single View App\u3092\u9078\u629e\u3057\uff0cNext\uff0e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1385\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-3.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1024\" height=\"625\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-3.png 1024w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-3-300x183.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-3-768x469.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>Product Name (\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u540d) \u3092\u300cLandmarks\u300d\u3068\u3057\u3066\u304a\u304d\u307e\u3059\uff0e<\/p>\n<p>Team\u306e\u90e8\u5206\u306f\uff0cNone\u306b\u3057\u3066\u304a\u304d\u307e\u3059\u304c\uff0c\u3082\u3057\u305d\u306e\u9078\u629e\u80a2\u304c\u306a\u3051\u308c\u3070\uff0c\"Add acount...\"\u304b\u3089\u30ed\u30b0\u30a4\u30f3\u3057\u3066\u304f\u3060\u3055\u3044\uff0e<\/p>\n<p>\u307e\u305f\uff0cOrganization Name\u3068Organization Identifier\u306f\u4f55\u3067\u3082\u826f\u3044\u306e\u3067\u3059\u304c\uff0c\u5f8c\u8005\u306f\u56fa\u6709\u306e\u3082\u306e\u306b\u3057\u305f\u3044\u306e\u3067<strong>\u30c9\u30e1\u30a4\u30f3\u540d\u3092\u9006\u3067\u66f8\u304f<\/strong>\u306e\u304c\u63a8\u5968\u3055\u308c\u3066\u3044\u307e\u3059\uff0e<\/p>\n<p>\u79c1\u3082\u305d\u3046\u3057\u3066\u3044\u307e\u3059\u304c\uff0c\u3053\u306e\u30a2\u30d7\u30ea\u3092\u516c\u958b\u3059\u308b\u308f\u3051\u3067\u306f\u306a\u3044\u306e\u3067\uff0c\u307f\u306a\u3055\u3093\u306f\u9069\u5f53\u3067\u69cb\u3044\u307e\u305b\u3093\uff0e<\/p>\n<p>\u3061\u306a\u307f\u306b\uff0cUnit Test (\u5358\u4f53\u30c6\u30b9\u30c8) \u3084UI Test\u3082\uff0c\u672c\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u53d6\u308a\u4e0a\u3052\u306a\u3044\u306e\u3067\u30c1\u30a7\u30c3\u30af\u3092\u5916\u3057\u3066\u3082\u826f\u3044\u3067\u3059\uff0e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1386\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-4.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1024\" height=\"625\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-4.png 1024w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-4-300x183.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-4-768x469.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>\u6b21\u306b\uff0c\u4fdd\u5b58\u5834\u6240\u3092\u9069\u5f53\u306b\u6c7a\u3081\u3066\u4fdd\u5b58\u3057\u307e\u3059\uff0e<\/p>\n<p>\u30db\u30fc\u30e0\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306a\u3069\u306b\u300cSwiftProjects\u300d\u3084\u300cXcodeProjects\u300d\u3068\u3044\u3063\u305f\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3092\u4f5c\u6210\u3059\u308b\u306e\u304c\u304a\u3059\u3059\u3081\u3067\u3059\uff0e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1387\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-5.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1400\" height=\"738\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-5.png 1400w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-5-300x158.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-5-768x405.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-5-1024x540.png 1024w\" sizes=\"auto, (max-width: 1400px) 100vw, 1400px\" \/><\/p>\n<p>\u3055\u3042\uff0cXcode\u304c\u7acb\u3061\u4e0a\u304c\u308a\u307e\u3057\u305f\uff0e<\/p>\n<p>\u3059\u3067\u306b<strong>\u3044\u304f\u3064\u304b\u30d5\u30a1\u30a4\u30eb\u3084\u30b3\u30fc\u30c9\u304c\u81ea\u52d5\u751f\u6210\u3055\u308c\u3066\u3044\u307e\u3059<\/strong>\u306d\uff0e<\/p>\n<h3>Step 2. \u5b9f\u884c\u3057\u3066\u307f\u308b<\/h3>\n<p>\u307e\u305a\u306f\u5b9f\u884c\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff0e<\/p>\n<p>\u53f3\u4e0a\u306e \"Resume\" \u3068\u3044\u3046\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff0e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1389\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-6.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1400\" height=\"738\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-6.png 1400w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-6-300x158.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-6-768x405.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-6-1024x540.png 1024w\" sizes=\"auto, (max-width: 1400px) 100vw, 1400px\" \/><\/p>\n<p>iPhone\u306b\u3088\u308b\u30d7\u30ec\u30d3\u30e5\u30fc\u304c\u8868\u793a\u3055\u308c\u308b\u304b\u3068\u601d\u3044\u307e\u3059\uff0e<\/p>\n<p>\u3053\u3053\u3067\uff0c\u30b3\u30fc\u30c9\u4e2d\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u5909\u66f4\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff0e<\/p>\n<pre class=\"lang:c++ mark:3 decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct ContentView: View {\r\n    var body: some View {\r\n        Text(\"Hello, SwiftUI!\")\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1390\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-7.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1400\" height=\"738\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-7.png 1400w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-7-300x158.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-7-768x405.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-7-1024x540.png 1024w\" sizes=\"auto, (max-width: 1400px) 100vw, 1400px\" \/><\/p>\n<p>\u30d7\u30ec\u30d3\u30e5\u30fc\u3082\u5909\u66f4\u3055\u308c\u307e\u3057\u305f\uff0e<\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\uff0cXcode\u4e2d\u306e\u30d7\u30ec\u30d3\u30e5\u30fc\u306f\uff0c\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u63db\u3048\u308b\u3068\u81ea\u52d5\u7684\u306b\u518d\u63cf\u753b\u3057\u3066\u304f\u308c\u307e\u3059\uff0c\u4fbf\u5229\u3067\u3059\u306d\uff0e<\/p>\n<hr \/>\n<p>...<\/p>\n<p>\u3055\u3066\uff0c<strong>\u4e2d\u7d1a\u8005\u306e\u65b9\u306b\u5411\u3051\uff0c\u305d\u3057\u3066\u521d\u5fc3\u8005\u304c\u4e2d\u7d1a\u8005\u306b\u306a\u308b\u305f\u3081\u306b\uff0c\u5c11\u3057\u3060\u3051\u30b3\u30fc\u30c9\u306e\u89e3\u8aac\u3092\u3057\u3066\u307f\u307e\u3059<\/strong>\uff0e<\/p>\n<pre class=\"lang:swift decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">import SwiftUI<\/pre>\n<p>\u3053\u308c\u306f\u898b\u3066\u306e\u901a\u308a\u306a\u306e\u3067\uff0c\u5927\u4e08\u592b\u3067\u3059\u306d\uff0e<\/p>\n<p><span class=\"lang:swift decode:true crayon-inline\">SwiftUI<\/span>\u00a0\u3068\u3044\u3046\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\u3066\u3044\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct ContentView: View {\r\n    var body: some View {\r\n        Text(\"Hello, SwiftUI!\")\r\n    }\r\n}<\/pre>\n<p>\u3053\u308c\u306f\uff0c\u5148\u307b\u3069\u78ba\u8a8d\u3057\u305f\u3088\u3046\u306b\uff0c\u30d3\u30e5\u30fc\u3092\u53f8\u308b<a href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1343\/#_struct\">\u69cb\u9020\u4f53<\/a>\u3067\u3059\uff0e<\/p>\n<p>SwiftUI\u306e<span class=\"lang:swift decode:true crayon-inline \">View<\/span> \u3068\u3044\u3046<a href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1343\/#_protocol\">\u30d7\u30ed\u30c8\u30b3\u30eb<\/a>\u3092\u7d99\u627f\u3057\u305f\u3082\u306e\u304c\uff0c\u30a2\u30d7\u30ea\u3067\u306f\u30d3\u30e5\u30fc\u3068\u3057\u3066\u6271\u308f\u308c\u307e\u3059\uff0e<\/p>\n<p>\u305d\u3057\u3066\uff0c\u30d7\u30ed\u30d1\u30c6\u30a3\u3068\u3057\u3066<span class=\"lang:swift decode:true crayon-inline \">body<\/span> \u3068\u3044\u3046\u540d\u306e<a href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1343\/#_struct\">Computed Propaty<\/a>\u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u307e\u3059\u304c\uff0c\u3053\u308c\u304c\u30d3\u30e5\u30fc\u306e\u6838\u306b\u306a\u308a\u307e\u3059\uff0e<\/p>\n<p><span class=\"lang:swift decode:true crayon-inline \">some<\/span> \u30ad\u30fc\u30ef\u30fc\u30c9\u306f\uff0c\u540c\u3058\u30d7\u30ed\u30c8\u30b3\u30eb (\u578b) \u3067\u3042\u3063\u3066\u3082\u5225\u578b\u306e\u3088\u3046\u306b\u6271\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u3088\u3046\u306b\u3057\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct ContentView_Previews: PreviewProvider {\r\n    static var previews: some View {\r\n        ContentView()\r\n    }\r\n}<\/pre>\n<p>\u6700\u5f8c\u306b\u3053\u306e\u90e8\u5206\uff0e<\/p>\n<p>\u3053\u3053\u3067\u306f\uff0c\u5148\u307b\u3069\u8868\u793a\u3055\u308c\u3066\u3044\u305f\u30d7\u30ec\u30d3\u30e5\u30fc\u3092\u62c5\u5f53\u3059\u308b\u30b3\u30fc\u30c9\u304c\u66f8\u304b\u308c\u3066\u3044\u307e\u3059\uff0e<\/p>\n<p><span class=\"lang:swift decode:true crayon-inline \">PreviewProvider<\/span> \u30d7\u30ed\u30c8\u30b3\u30eb\u3092\u7d99\u627f\u3059\u308b\u3060\u3051\u3067\uff0c\u305d\u3046\u3044\u3063\u305f\u6271\u3044\u306b\u306a\u308a\u307e\u3059\uff0e<\/p>\n<h3>Step 3. \u30c6\u30ad\u30b9\u30c8\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3059\u308b<\/h3>\n<p>\u6b21\u306b\uff0c\u30d3\u30e5\u30fc\u306e\u69cb\u6210\u8981\u7d20\u3092\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff0e<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\uff0c\u5148\u307b\u3069\u306e\u30c6\u30ad\u30b9\u30c8\u3092\u4f8b\u306b\u3084\u3063\u3066\u307f\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift mark:4 decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct ContentView: View {\r\n    var body: some View {\r\n        Text(\"Hello, SwiftUI!\")\r\n            .font(.title)\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1392\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-8.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"705\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-8.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-8-300x176.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-8-768x451.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-8-1024x602.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<pre class=\"lang:swift mark:5 decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct ContentView: View {\r\n    var body: some View {\r\n        Text(\"Hello, SwiftUI!\")\r\n            .font(.title)\r\n            .foregroundColor(.green)\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1393\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-9.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"705\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-9.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-9-300x176.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-9-768x451.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-9-1024x602.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u3068\u3066\u3082\u76f4\u611f\u7684\u3067\u5206\u304b\u308a\u3084\u3059\u3044\u3067\u3059\u306d\uff0e<\/p>\n<p>\u3082\u3057\u304f\u306f\uff0ccommand \u2318\u3092\u62bc\u3057\u306a\u304c\u3089\uff0c<span class=\"lang:swift decode:true crayon-inline \">Text( ... )<\/span> \u3092\u30af\u30ea\u30c3\u30af\u3057\u3066\uff0c<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1394\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-10.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1024\" height=\"657\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-10.png 1024w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-10-300x192.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-10-768x493.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>Show SwiftUI Inspector... \u3092\u30af\u30ea\u30c3\u30af\u3057\u307e\u3059\uff0e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1395\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-11.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1024\" height=\"869\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-11.png 1024w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-11-300x255.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-11-768x652.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>\u3059\u308b\u3068\uff0c\u3053\u306e\u3088\u3046\u306b\u30b3\u30fc\u30c9\u3092\u76f4\u63a5\u3044\u3058\u3089\u306a\u304f\u3068\u3082\uff0c\u8996\u899a\u7684\u306b\u30ab\u30b9\u30bf\u30de\u30a4\u30ba\u3082\u53ef\u80fd\u3067\u3059\uff0e<\/p>\n<hr \/>\n<p>...<\/p>\n<p>\u3055\u3066\uff0c<strong>\u3053\u3053\u3067\u3082\u3061\u3087\u3063\u3068\u8a73\u3057\u304f\u89e3\u8aac\u3092\u5165\u308c\u307e\u3059<\/strong>\uff0e<\/p>\n<pre class=\"lang:swift decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">Text(\"Hello, SwiftUI!\")\r\n            .font(.title)\r\n            .foregroundColor(.green)<\/pre>\n<p>\u306e<span class=\"lang:swift decode:true crayon-inline \">Text( ... )<\/span>\u00a0\u306f\u3072\u3068\u3064\u306e\u69cb\u9020\u4f53\u3067\u3059\uff0e<\/p>\n<p>\u305d\u3057\u3066\uff0c\u305d\u306e\u5f8c\u306b\u304f\u3063\u3064\u304f<span class=\"lang:swift decode:true crayon-inline\">.font(.title)<\/span> \u306f\u30e1\u30bd\u30c3\u30c9\u306b\u5f53\u305f\u308b\u308f\u3051\u3067\u3059\u306d\uff0e<\/p>\n<p>\u5404\u30e1\u30bd\u30c3\u30c9\u304c<span class=\"lang:swift decode:true crayon-inline \">Text<\/span> \u578b\u3092\u8fd4\u3057\u3066\u3044\u308b\u306e\u3067\uff0c\u7279\u306b\u4e0d\u601d\u8b70\u306a\u3053\u3068\u306f\u306a\u3044\u306e\u3067\u3059\u304c\uff0c<span class=\"lang:swift decode:true crayon-inline \">.title<\/span>\u00a0\u306f\u3061\u3087\u3063\u3068\u4e0d\u601d\u8b70\u306b\u601d\u3046\u304b\u3082\u3057\u308c\u307e\u305b\u3093\uff0e<\/p>\n<p>\u30c9\u30c3\u30c8<span class=\"lang:c++ decode:true crayon-inline \">.<\/span>\u00a0\u306e\u524d\u306b\u4f55\u3082\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3082\u306a\u3044\u308f\u3051\u3067\u3059\u304b\u3089\uff0e<\/p>\n<p>\u5b9f\u306f\uff0c<strong>Swift\u3067\u306f\u578b\u63a8\u8ad6\u306e\u67d4\u8edf\u6027\u304c\u9ad8\u3044<\/strong>\u3067\u3059\uff0e<\/p>\n<p>\u4eca\u56de\u306e\u5834\u5408\uff0c<span class=\"lang:swift decode:true crayon-inline \">font()<\/span>\u00a0\u306e\u5f15\u6570\u306f\u5b9a\u7fa9\u4e0a\u3067\u306f<span class=\"lang:swift decode:true crayon-inline\">public func font(_ font: Font?) -&gt; Text<\/span>\u00a0\u3068\u306a\u3063\u3066\u3044\u308b\u305f\u3081\uff0c\u30b3\u30f3\u30d1\u30a4\u30e9\u306f<span class=\"lang:swift decode:true crayon-inline \">.font(Font.title)<\/span>\u00a0\u3068\u63a8\u8ad6\u3057\u3066\u304f\u308c\u308b\u308f\u3051\u3067\u3059\u306d\uff0e<\/p>\n<p>\u3061\u306a\u307f\u306b\u4eca\uff0c\u3055\u3089\u3063\u3068\u3067\u3066\u304d\u305f\uff0c<span class=\"lang:swift decode:true crayon-inline \">Font?<\/span> \u306b\u3064\u3044\u3066\u8208\u5473\u3042\u308b\u65b9\u306f<a href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1343\/#Optional\">Optional\u578b<\/a>\u3092\u898b\u3066\u307f\u3066\u304f\u3060\u3055\u3044\uff0e<br \/>\n<script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js\"><\/script><br \/>\n<ins class=\"adsbygoogle\" style=\"display: block; text-align: center;\" data-ad-layout=\"in-article\" data-ad-format=\"fluid\" data-ad-client=\"ca-pub-7123758399787647\" data-ad-slot=\"1665651601\"><\/ins><br \/>\n<script>\n     (adsbygoogle = window.adsbygoogle || []).push({});\n<\/script><\/p>\n<h3>Step 4. Stack\u3092\u4f7f\u3063\u305f\u30d3\u30e5\u30fc\u306e\u7d44\u307f\u5408\u308f\u305b<\/h3>\n<p>\u3053\u3053\u304c\u7b2c1\u56de\u306e\u5927\u4e8b\u306a\u90e8\u5206\u3067\u3059\uff0e<\/p>\n<p>\u30d3\u30e5\u30fc\u306f\u4e00\u3064\u3067\u306f\u3069\u3046\u306b\u3082\u306a\u308a\u307e\u305b\u3093\uff0e<\/p>\n<p>\u5148\u307b\u3069\u306e\u30c6\u30ad\u30b9\u30c8\u306b\u3057\u3066\u3082\uff0c<strong>\u8907\u6570\u306e\u30c6\u30ad\u30b9\u30c8\u3084\uff0c\u753b\u50cf\u306e\u7d44\u307f\u5408\u308f\u305b\u3067\u7f8e\u3057\u3044\u30d3\u30e5\u30fc\u3092\u4f5c\u308a\u4e0a\u3052\u308b<\/strong>\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\uff0e<\/p>\n<p>\u305d\u3053\u3067\uff0cSwiftUI\u3067\u306fStack\u3068\u3044\u3046\u6a5f\u80fd\u304c\u3042\u308a\u307e\u3059\uff0e<\/p>\n<p>\u5b9f\u969b\u306b\u4f7f\u3063\u3066\u307f\u307e\u3057\u3087\u3046\uff0e<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\uff0c\u30d9\u30fc\u30b9\u3092\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3057\u3066\u304a\u304d\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct ContentView: View {\r\n    var body: some View {\r\n        Text(\"Turtle Rock\")\r\n            .font(.title)\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1399\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-12.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"656\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-12.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-12-300x164.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-12-768x420.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-12-1024x560.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u3053\u3053\u306e\u300cTurtle Rock\u300d\u3068\u3044\u3046\u30bf\u30a4\u30c8\u30eb (\u89b3\u5149\u5730\u540d) \u306e\u4e0b\u90e8\u306b\uff0c\u5834\u6240\u3092\u30b5\u30d6\u30bf\u30a4\u30c8\u30eb\u306e\u3088\u3046\u306a\u5f62\u3067\u3092\u5165\u308c\u3066\u307f\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift mark:3,6,7 decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct ContentView: View {\r\n    var body: some View {\r\n        VStack{\r\n            Text(\"Turtle Rock\")\r\n                .font(.title)\r\n            Text(\"Joshua Tree National Park\")\r\n        }\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1400\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-13.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"656\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-13.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-13-300x164.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-13-768x420.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-13-1024x560.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p><strong>\u30c6\u30ad\u30b9\u30c8\u304c\u5782\u76f4\u65b9\u5411\u306b\u7a4d\u307f\u4e0a\u304c\u308a\u307e\u3057\u305f<\/strong>\u306d\uff0e<\/p>\n<p>\u305d\u3046\uff0c<span class=\"lang:swift decode:true crayon-inline \">VStack { }<\/span> \u306fVertical Stack\u306e\u7565\u3067\uff0c\u5782\u76f4\u6b69\u884c\u306b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u7a4d\u307f\u4e0a\u3052\u308b\u69cb\u9020\u4f53\u3067\u3059\uff0e<\/p>\n<p>\u4ed6\u306b\u3082\uff0cHorizontal Stack (\u6c34\u5e73\u65b9\u5411) \u306e<span class=\"lang:swift decode:true crayon-inline \">HStack { }<\/span> \uff0c\u624b\u524d\u65b9\u5411 (z\u8ef8\u65b9\u5411)\u306e<span class=\"lang:swift decode:true crayon-inline \">ZStack { }<\/span>\u00a0\u304c\u3042\u308a\u307e\u3059\uff0e<\/p>\n<p>\u3082\u3046\u5c11\u3057\uff0c\u30d3\u30e5\u30fc\u3092\u6574\u3048\u3066\u307f\u307e\u3057\u3087\u3046\uff0e<\/p>\n<pre class=\"lang:swift mark:3,7 decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct ContentView: View {\r\n    var body: some View {\r\n        VStack(alignment: .leading) {\r\n            Text(\"Turtle Rock\")\r\n                .font(.title)\r\n            Text(\"Joshua Tree National Park\")\r\n                .font(.subheadline)\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1401\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-14.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"656\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-14.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-14-300x164.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-14-768x420.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-14-1024x560.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>Stack\u7cfb\u306f\uff0c\u5f15\u6570\u3068\u3057\u3066\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u5de6\u5bc4\u305b\u30fb\u53f3\u5bc4\u305b\u304c\u53ef\u80fd\u3067\u3059\uff0e<\/p>\n<p><span class=\"lang:swift decode:true crayon-inline\">.leadnig<\/span> \u304c\u5de6\u5bc4\u305b\uff0c<span class=\"lang:swift decode:true crayon-inline \">.center<\/span> \u304c\u4e2d\u592e\u5bc4\u305b\uff0c<span class=\"lang:swift decode:true crayon-inline \">.trailing<\/span> \u304c\u53f3\u5bc4\u305b\u3067\u3059\uff0e<\/p>\n<p>\u305d\u3046\u3057\u305f\u3089\uff0c\u4ed6\u306eStack\u3082\u7d44\u307f\u5408\u308f\u305b\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n<pre class=\"lang:swift mark:6,9-14 decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct ContentView: View {\r\n    var body: some View {\r\n        VStack(alignment: .leading) {\r\n            Text(\"Turtle Rock\")\r\n                .font(.title)\r\n            HStack {\r\n                Text(\"Joshua Tree National Park\")\r\n                    .font(.subheadline)\r\n                \r\n                Spacer()\r\n                \r\n                Text(\"California\")\r\n                    .font(.subheadline)\r\n            }\r\n        }\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1403\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-15.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"656\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-15.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-15-300x164.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-15-768x420.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-15-1024x560.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\uff0c<strong>Stack\u306e\u30cd\u30b9\u30c8<\/strong>\u3082\u53ef\u80fd\u3067\u3059\uff0e<\/p>\n<p>\u3053\u3053\u3067\uff0c<span class=\"lang:swift decode:true crayon-inline \">Spacer()<\/span> \u306f\u30b9\u30da\u30fc\u30b9\u3092\u52d5\u7684\u306b\u78ba\u4fdd\u3059\u308b\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3067\u3059\uff0e<\/p>\n<p>\u3055\u3089\u306b\uff0c\u4eca\u306e\u307e\u307e\u3060\u3068\u4f59\u767d\u304c\u306a\u304f\u3061\u3087\u3063\u3068\u30c0\u30b5\u3044\u306e\u3067\uff0c<span class=\"lang:swift decode:true crayon-inline \">VStack { }<\/span>\u00a0\u306b\u5bfe\u3057\u3066\u4f59\u767d\u3092\u5165\u308c\u307e\u3057\u3087\u3046\uff0e<\/p>\n<pre class=\"lang:swift mark:16 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct ContentView: View {\r\n    var body: some View {\r\n        VStack(alignment: .leading) {\r\n            Text(\"Turtle Rock\")\r\n                .font(.title)\r\n            HStack {\r\n                Text(\"Joshua Tree National Park\")\r\n                    .font(.subheadline)\r\n                \r\n                Spacer()\r\n                \r\n                Text(\"California\")\r\n                    .font(.subheadline)\r\n            }\r\n        }\r\n        .padding()\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1405\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-16.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"656\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-16.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-16-300x164.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-16-768x420.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-16-1024x560.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u4f59\u767d\u3067\u304b\u306a\u308a\u30c7\u30b6\u30a4\u30f3\u304c\u3088\u304f\u306a\u308a\u307e\u3057\u305f\uff01<\/p>\n<p>\u3053\u3053\u307e\u3067\u3092\u307e\u3068\u3081\u308b\u3068\uff0c\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30a4\u30e1\u30fc\u30b8\u3067\u3059\uff0e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1407\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-17.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1600\" height=\"336\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-17.png 1600w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-17-300x63.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-17-768x161.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-17-1024x215.png 1024w\" sizes=\"auto, (max-width: 1600px) 100vw, 1600px\" \/><\/p>\n<hr \/>\n<p>...<\/p>\n<p><strong>\u6b21\u306e\u30b9\u30c6\u30c3\u30d7\u306b\u79fb\u308b\u524d\u306b\uff0c\u3061\u3087\u3063\u3068\u7d30\u304b\u3044\u8a71\u3092\u631f\u307f\u307e\u3059<\/strong>\uff0e<\/p>\n<p>\u4eca\uff0c\u4f7f\u7528\u3057\u3066\u3044\u308bStack\u7cfb\u306e\u69cb\u9020\u4f53\u306f\u5c11\u3057\u7279\u6b8a\u306a\u5f62\u3092\u3057\u3066\u3044\u308b\u3053\u3068\u306b\u304a\u6c17\u3065\u304d\u3067\u3057\u3087\u3046\u304b\uff1f<\/p>\n<p>\u3068\u3066\u3082\u76f4\u611f\u7684\u306b\u6271\u3048\u308b\u4e00\u65b9\u3067\uff0cStack\u306e<span class=\"lang:swift decode:true crayon-inline \">{ }<\/span> \u5185\u306f\u4e00\u4f53\u3069\u306e\u3088\u3046\u306a\u51e6\u7406\u304c\u884c\u308f\u308c\u3066\u3044\u308b\u306e\u304b\u6c17\u306b\u306a\u308a\u307e\u305b\u3093\u304b\uff1f<\/p>\n<p>\u305d\u306e\u3088\u3046\u306a\u7591\u554f\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067\u89e3\u8aac\u3057\u3066\u3044\u308b\u306e\u3067\uff0c\u4f59\u529b\u306e\u3042\u308b\u65b9\u306f\u8aad\u3093\u3067\u307f\u3066\u304f\u3060\u3055\u3044\uff0e<\/p>\n<ol>\n<li><a href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1365\/\" target=\"_blank\" rel=\"noopener noreferrer\">SwiftUI\u306e*Stack{ }\u3084List{ }\u306e\u8b0e\u3092\u89e3\u304f\u8a18\u4e8b\u3010\u6ce2\u62ec\u5f27\u306f\u4f55\uff1f\u3011<\/a><\/li>\n<\/ol>\n<h3>Step 5. \u30a4\u30e1\u30fc\u30b8\u30d3\u30e5\u30fc\u306e\u30ab\u30b9\u30bf\u30e0<\/h3>\n<p>\u6b21\u306b\uff0c\u753b\u50cf\u3092\u30d3\u30e5\u30fc\u3067\u6271\u3046\u65b9\u6cd5\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\uff0e<\/p>\n<p>\u305d\u306e\u524d\u306b<strong>\u672c\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u6271\u3046\u753b\u50cf\u305f\u3061\u3092\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9\u3057\u3066\u304f\u3060\u3055\u3044<\/strong>\uff0e<\/p>\n<p>???? <a href=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/Resources.zip\">Resources.zip<\/a><\/p>\n<p>\u4e2d\u306b\u306f<strong>\u89b3\u5149\u5730\u306e\u753b\u50cf<\/strong>\u3068\uff0c\u6b21\u56de\u4ee5\u964d\u4f7f\u3046<strong>\u5404\u89b3\u5149\u5730\u306e\u60c5\u5831\u304c\u8a70\u307e\u3063\u305fJSON\u30d5\u30a1\u30a4\u30eb\u306a\u3069<\/strong>\u3082\u5165\u3063\u3066\u3044\u307e\u3059\uff0e<\/p>\n<p>\u3053\u308c\u3092 File &gt; Add Files to \"Landmarks\"... \u304b\u3089\u8ffd\u52a0\u3057\u3066\u304f\u3060\u3055\u3044\uff0e(command\u2318 + option + A\u3067\u3082\u53ef)<\/p>\n<p><strong>Added folders\u306f\uff0c\u300cCreate groups\u300d\u306b\u30c1\u30a7\u30c3\u30af\u3057\u3066\u304f\u3060\u3055\u3044<\/strong>\uff0e<\/p>\n<p>\u305d\u3046\u3057\u305f\u3089\uff0c\u672c\u984c\u306b\u5165\u308a\u307e\u3059\uff0e<\/p>\n<p>\u307e\u305a\uff0c<strong>\u300cResources\u300d\u304b\u3089\u300cAssets.xcassets\u300d\u306b\u4f7f\u3046\u753b\u50cf\u3092\u30c9\u30e9\u30c3\u30b0<\/strong>\u3057\u307e\u3059\uff0e<\/p>\n<p>\u4eca\u56de\u306f\u300cturtlerock.jpg\u300d\u3060\u3051\u3067\u3059\uff0e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1414\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-19.gif\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"640\" height=\"400\" \/><\/p>\n<p>\u30a2\u30bb\u30c3\u30c8\u30ab\u30bf\u30ed\u30b0\u306b\u306f\u30a2\u30d7\u30ea\u306e\u30a2\u30a4\u30b3\u30f3\u306a\u3069\u56fa\u5b9a\u753b\u50cf\u3092\u767b\u9332\u3059\u308b\u3053\u3068\u304c\u3067\u304d\uff0c\u3069\u3053\u3067\u3082\u7c21\u5358\u306b\u547c\u3073\u51fa\u3059\u3053\u3068\u304c\u3067\u304d\u307e\u3059\uff0e<\/p>\n<p>\u305d\u3046\u3057\u305f\u3089\uff0c<strong>command\u2318 + N\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u65b0\u3057\u304f\u4f5c\u6210\u3057\u307e\u3059<\/strong>\uff0e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1412\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-18.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1024\" height=\"737\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-18.png 1024w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-18-300x216.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-18-768x553.png 768w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/p>\n<p>\u540d\u524d\u306f\u300cCircleImage.swift\u300d\u3068\u3057\u3066\u304a\u304d\u307e\u3059\uff0e<\/p>\n<p>\u305d\u3046\u3057\u305f\u3089\uff0c\u65e9\u901f\u753b\u50cf\u3092\u8aad\u307f\u8fbc\u3093\u3067\u8868\u793a\u3055\u305b\u3066\u307f\u307e\u3057\u3087\u3046\uff01<\/p>\n<pre class=\"lang:swift mark:5 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">import SwiftUI\r\n\r\nstruct CircleImage: View {\r\n    var body: some View {\r\n        Image(\"turtlerock\")\r\n    }\r\n}\r\n\r\nstruct CircleImage_Previews: PreviewProvider {\r\n    static var previews: some View {\r\n        CircleImage()\r\n    }\r\n}\r\n<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1416\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-20.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"686\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-20.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-20-300x172.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-20-768x439.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-20-1024x585.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u753b\u50cf\u304c\u633f\u5165\u3067\u304d\u307e\u3057\u305f\uff01<\/p>\n<p>\u305d\u3046\u3057\u305f\u3089\uff0c\u52a0\u5de5\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<pre class=\"lang:swift mark:4 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct CircleImage: View {\r\n    var body: some View {\r\n        Image(\"turtlerock\")\r\n            .clipShape(Circle())\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1417\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-21.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"686\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-21.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-21-300x172.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-21-768x439.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-21-1024x585.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<pre class=\"lang:swift mark:5-7 decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct CircleImage: View {\r\n    var body: some View {\r\n        Image(\"turtlerock\")\r\n            .clipShape(Circle())\r\n            .overlay(\r\n                Circle().stroke(Color.white, lineWidth: 4))\r\n            .shadow(radius: 10)\r\n        \r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1418\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-22.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"686\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-22.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-22-300x172.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-22-768x439.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-22-1024x585.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u304a\u6d12\u843d\u306b\u4ed5\u4e0a\u304c\u308a\u307e\u3057\u305f\uff0e<\/p>\n<p>\u3068\u308a\u3042\u3048\u305a\u753b\u50cf\u306e\u52a0\u5de5\u306f\u3053\u308c\u3067\u826f\u3044\u3068\u3057\u3066\u5148\u306b\u9032\u307f\u307e\u3059\uff0e<\/p>\n<p>\u4f7f\u3044\u65b9\u3068\u3057\u3066\uff0c<strong>\u3053\u3053\u3067\u4f5c\u3063\u305f\u30d3\u30e5\u30fc\u306f\u5225\u306e\u30d3\u30e5\u30fc\u3067\u547c\u3073\u51fa\u3059<\/strong>\u306e\u3067\uff0c\u3053\u306e\u307e\u307e\u306b\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\uff0e<\/p>\n<h3>Step 6. \u30de\u30c3\u30d7\u30d3\u30e5\u30fc\u3092\u4f5c\u308b<\/h3>\n<p>\u7b2c1\u56de\u76ee\u3082\u5f8c\u534a\u6226\u3067\u3059\uff0c\u5f8c\u5c11\u3057\u9811\u5f35\u308a\u307e\u3057\u3087\u3046\uff0e<\/p>\n<p>\u6b21\u306b\uff0c<strong>\u89b3\u5149\u5730\u306e\u4e00\u5ea7\u6a19\u304b\u3089\u30de\u30c3\u30d7\u60c5\u5831\u3092\u53d6\u5f97\u3057\uff0c\u30d3\u30e5\u30fc\u306b\u7d44\u307f\u8fbc\u3080<\/strong>\u3053\u3068\u3092\u8003\u3048\u307e\u3059\uff0e<\/p>\n<p>\u65b0\u3057\u304f\uff0c\u300cMapView.swift\u300d\u3092\u4f5c\u6210\u3057\u3066\u304f\u3060\u3055\u3044\uff0e<\/p>\n<p>\u305d\u3046\u3057\u305f\u3089\uff0cMapKit\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3057\uff0c\u7d99\u627f\u3059\u308b\u30d7\u30ed\u30c8\u30b3\u30eb\u3082\u5909\u66f4\u3057\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift mark:2,4 decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">import SwiftUI\r\nimport MapKit\r\n\r\nstruct MapView: UIViewRepresentable {\r\n    var body: some View {\r\n        Text(\"Hello, World!\")\r\n    }\r\n}<\/pre>\n<p>\u6b21\u306b\uff0c\u7d99\u627f\u3057\u305f\u30d7\u30ed\u30c8\u30b3\u30eb\u306b\u5247\u308a\uff0c\u5fc5\u8981\u306a\u30e1\u30bd\u30c3\u30c9\u3092\u8a18\u8ff0\u3057\u3066\u3044\u304d\u307e\u3059\uff0e<\/p>\n<p>\u3053\u306e\u6642\u70b9\u3067\u306f\uff0c\u898b\u69d8\u898b\u771f\u4f3c\u3067\u69cb\u3044\u307e\u305b\u3093\uff0e<\/p>\n<pre class=\"lang:swift mark:2-4 decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct MapView: UIViewRepresentable {\r\n    func makeUIView(context: Context) -&gt; MKMapView {\r\n        MKMapView(frame: .zero)\r\n    }\r\n}<\/pre>\n<p>\u3042\u3068\u3072\u3068\u3064\u30e1\u30bd\u30c3\u30c9\u304c\u5fc5\u8981\u3067\u3059\uff0e<\/p>\n<pre class=\"lang:swift mark:6-12 decode:true \">struct MapView: UIViewRepresentable {\r\n    func makeUIView(context: Context) -&gt; MKMapView {\r\n        MKMapView(frame: .zero)\r\n    }\r\n    \r\n    func updateUIView(_ uiView: MKMapView, context: Context) {\r\n        let coordinate = CLLocationCoordinate2D(\r\n            latitude: 34.011286, longitude: -116.166868)\r\n        let span = MKCoordinateSpan(latitudeDelta: 2.0, longitudeDelta: 2.0)\r\n        let region = MKCoordinateRegion(center: coordinate, span: span)\r\n        uiView.setRegion(region, animated: true)\r\n    }\r\n}<\/pre>\n<p>\u3053\u308c\u3067OK\u3067\u3059\uff0e<\/p>\n<p>\u30d7\u30ec\u30d3\u30e5\u30fc\u3067\u78ba\u8a8d\u3057\u307e\u3059\u304c\uff0c<strong>\u30de\u30c3\u30d7\u3092\u7acb\u3061\u4e0a\u3052\u308b\u306b\u306f\u25b6\ufe0e\u3067\u5b9f\u969b\u306b\u52d5\u4f5c\u3055\u305b\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059<\/strong>\uff0e<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1420\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-23.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"686\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-23.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-23-300x172.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-23-768x439.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-23-1024x585.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u3046\u307e\u304f\u52d5\u4f5c\u3057\u3066\u3044\u305d\u3046\u3067\u3059\uff0e<\/p>\n<p>\u5b9f\u969b\u306b\u30de\u30c3\u30d7\u306e\u52d5\u4f5c\u3092\u6c7a\u5b9a\u3057\u3066\u3044\u308b\u306e\u306f\uff0c<\/p>\n<pre class=\"lang:swift decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">let coordinate = CLLocationCoordinate2D(\r\n            latitude: 34.011286, longitude: -116.166868)<\/pre>\n<p>\u3067\u3059\u306d\uff0e<\/p>\n<p>\u7def\u5ea6 (latitude) \u3068\u7d4c\u5ea6 (longitude) \u304b\u3089\u306a\u308b\u5ea7\u6a19 (coordinate) \u30c7\u30fc\u30bf\u304c\u6838\u3067\u3059\uff0e<\/p>\n<h3>Step 7. \u5404\u30d3\u30e5\u30fc\u3092\u7d44\u307f\u5408\u308f\u305b\u308b<\/h3>\n<p>\u7b2c1\u56de\u6700\u5f8c\u306e\u30bb\u30af\u30b7\u30e7\u30f3\u3067\u3059\uff0e<\/p>\n<p>\u5148\u307b\u3069\u4f5c\u3063\u305f\u30d3\u30e5\u30fc\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u307f\u307e\u3057\u3087\u3046\uff0e<\/p>\n<p>\u300cContentView.swift\u300d\u306b\u623b\u308a\u307e\u3059\uff0e<\/p>\n<p>\u30de\u30c3\u30d7\u30d3\u30e5\u30fc\u3068\u30a4\u30e1\u30fc\u30b8\u30d3\u30e5\u30fc\u3092\u5782\u76f4\u65b9\u5411\u306b\u7a4d\u307f\u4e0a\u3052\u305f\u3044\u306e\u3067\uff0c\u307e\u305a\u306f\u5927\u67a0\u3068\u3057\u3066<span class=\"lang:swift decode:true crayon-inline \">VStack { }<\/span>\u00a0\u3067\u56f2\u307f\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift mark:3 decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct ContentView: View {\r\n    var body: some View {\r\n        VStack {\r\n            VStack(alignment: .leading) {\r\n                Text(\"Turtle Rock\")\r\n                    .font(.title)\r\n                HStack {\r\n                    Text(\"Joshua Tree National Park\")\r\n                        .font(.subheadline)\r\n                    \r\n                    Spacer()\r\n                    \r\n                    Text(\"California\")\r\n                        .font(.subheadline)\r\n                }\r\n            }\r\n            .padding()\r\n        }\r\n    }\r\n}<\/pre>\n<p>\u6b21\u306b\uff0c\u30de\u30c3\u30d7\u30d3\u30e5\u30fc\u3092\u5165\u308c\u3066\u307f\u307e\u3057\u3087\u3046\uff0e<\/p>\n<pre class=\"lang:swift mark:4,5 decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct ContentView: View {\r\n    var body: some View {\r\n        VStack {\r\n            MapView()\r\n                .frame(height: 300)\r\n            \r\n            VStack(alignment: .leading) {\r\n                Text(\"Turtle Rock\")\r\n                    .font(.title)\r\n                HStack {\r\n                    Text(\"Joshua Tree National Park\")\r\n                        .font(.subheadline)\r\n                    \r\n                    Spacer()\r\n                    \r\n                    Text(\"California\")\r\n                        .font(.subheadline)\r\n                }\r\n            }\r\n            .padding()\r\n        }\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1422\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-24.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"686\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-24.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-24-300x172.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-24-768x439.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-24-1024x585.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u3055\u3089\u306b\u30a4\u30e1\u30fc\u30b8\u30d3\u30e5\u30fc\u3082\u8ffd\u52a0\u3057\u307e\u3059\uff0e<\/p>\n<p><span style=\"color: #993300;\">\u203b\u6ce8<\/span> \u3053\u306e\u3068\u304d\uff0c\u79c1\u306e\u74b0\u5883\u3060\u3068\u753b\u50cf\u304c\u306f\u307f\u51fa\u3066\u3057\u307e\u3063\u305f\u306e\u3067\uff0c\u00a0 \u30a2\u30bb\u30c3\u30c8\u30ab\u30bf\u30ed\u30b0 (Assets.xcassets) \u306e\u753b\u50cf\u3092 <strong>1x \u304b\u3089 2x \u306b\u5909\u66f4<\/strong>\u3057\u3066\u5bfe\u51e6\u3057\u307e\u3057\u305f\uff0e<\/p>\n<pre class=\"lang:swift mark:7-9 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct ContentView: View {\r\n    var body: some View {\r\n        VStack {\r\n            MapView()\r\n                .frame(height: 300)\r\n            \r\n            CircleImage()\r\n                .offset(y: -130)\r\n                .padding(.bottom, -130)\r\n            \r\n            VStack(alignment: .leading) {\r\n                Text(\"Turtle Rock\")\r\n                    .font(.title)\r\n                HStack {\r\n                    Text(\"Joshua Tree National Park\")\r\n                        .font(.subheadline)\r\n                    \r\n                    Spacer()\r\n                    \r\n                    Text(\"California\")\r\n                        .font(.subheadline)\r\n                }\r\n            }\r\n            .padding()\r\n        }\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1423\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-25.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"686\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-25.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-25-300x172.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-25-768x439.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-25-1024x585.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u3061\u306a\u307f\u306b<\/p>\n<pre class=\"lang:swift decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">CircleImage()\r\n\u3000\u3000\u3000\u3000.offset(y: -130)\r\n\u3000\u3000\u3000\u3000.padding(.bottom, -130)<\/pre>\n<p>\u3067\u306f\uff0c\u30aa\u30d5\u30bb\u30c3\u30c8\u3067y\u8ef8\u65b9\u5411\u306b130\u3060\u3051\u4e0a\u306b\u8868\u793a\u3092\u305a\u3089\u3057\uff0c\u30d1\u30c7\u30a3\u30f3\u30b0\u3067\u540c\u3058\u5206\u3060\u3051\u30de\u30a4\u30ca\u30b9\u306b\u4f59\u767d\u3092\u6e1b\u3089\u3059\u3053\u3068\u3067\uff0c\u3042\u305f\u304b\u3082\u753b\u50cf\u304c\u5358\u306b\u4e0a\u306b\u79fb\u52d5\u3057\u3066\u3044\u308b\u3088\u3046\u306b\u898b\u305b\u3066\u3044\u307e\u3059\uff0e<\/p>\n<p>\u305d\u3057\u3066\u6700\u5f8c\u306b\u4f59\u767d\u3092\u8abf\u6574\u3057\u307e\u3057\u3087\u3046\uff01<\/p>\n<pre class=\"lang:swift mark:26 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct ContentView: View {\r\n    var body: some View {\r\n        VStack {\r\n            MapView()\r\n                .frame(height: 300)\r\n            \r\n            CircleImage()\r\n                .offset(y: -130)\r\n                .padding(.bottom, -130)\r\n            \r\n            VStack(alignment: .leading) {\r\n                Text(\"Turtle Rock\")\r\n                    .font(.title)\r\n                HStack {\r\n                    Text(\"Joshua Tree National Park\")\r\n                        .font(.subheadline)\r\n                    \r\n                    Spacer()\r\n                    \r\n                    Text(\"California\")\r\n                        .font(.subheadline)\r\n                }\r\n            }\r\n            .padding()\r\n            \r\n            Spacer()\r\n        }\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1425\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-26.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"686\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-26.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-26-300x172.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-26-768x439.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-26-1024x585.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u3088\u304f\u306a\u308a\u307e\u3057\u305f\u306d\uff0e<\/p>\n<p>\u3053\u306e\u307e\u307e\u3067\u3082\u826f\u3044\u306e\u3067\u3059\u304c\uff0c\u6700\u4e0a\u90e8\u306e\u30a8\u30ea\u30a2\u3082\u8868\u793a\u57df\u3068\u3057\u3066\u6271\u3046\u5834\u5408\u306f\uff0c\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u6307\u5b9a\u3057\u3066\u3042\u3052\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift mark:5 decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct ContentView: View {\r\n    var body: some View {\r\n        VStack {\r\n            MapView()\r\n                .edgesIgnoringSafeArea(.top)\r\n                .frame(height: 300)\r\n            \r\n            CircleImage()\r\n                .offset(y: -130)\r\n                .padding(.bottom, -130)\r\n            \r\n            VStack(alignment: .leading) {\r\n                Text(\"Turtle Rock\")\r\n                    .font(.title)\r\n                HStack {\r\n                    Text(\"Joshua Tree National Park\")\r\n                        .font(.subheadline)\r\n                    \r\n                    Spacer()\r\n                    \r\n                    Text(\"California\")\r\n                        .font(.subheadline)\r\n                }\r\n            }\r\n            .padding()\r\n            \r\n            Spacer()\r\n        }\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-1426\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-27.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"686\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-27.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-27-300x172.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-27-768x439.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/1-27-1024x585.png 1024w\" sizes=\"auto, (max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u3068\u3066\u3082\u898b\u6804\u3048\u304c\u3088\u304f\u306a\u308a\u307e\u3057\u305f\u306d\uff0e<\/p>\n<p>\u3053\u308c\u3067\uff0c\u7b2c1\u56de\u306f\u7d42\u4e86\u3068\u306a\u308a\u307e\u3059\uff0c\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\uff01<\/p>\n<h2>\u7b2c1\u56de\uff1a\u304a\u308f\u308a\u306b<\/h2>\n<p>\u304a\u75b2\u308c\u69d8\u3067\u3057\u305f\uff0e<\/p>\n<p>\u7b2c1\u56de\u3082\u610f\u5916\u3068\u9577\u4e01\u5834\u3067\u3057\u305f\u306d\uff0e<\/p>\n<p>\u672c\u8a18\u4e8b\u3060\u3051\u3067\u3082SwiftUI\u306e\u57fa\u672c\u306f\u5168\u3066\u7fd2\u5f97\u3067\u304d\u305f\u3068\u3044\u3063\u3066\u3082\u826f\u3044\u3067\u3057\u3087\u3046\uff0e<\/p>\n<p>\u3057\u304b\u3057\uff0c\u307e\u3060\u307e\u3060\u91cd\u8981\u306aSwiftUI\u6a5f\u80fd\u306f\u305f\u304f\u3055\u3093\u3042\u308b\u306e\u3067\uff0c\u6e80\u8db3\u306b\u30a2\u30d7\u30ea\u304c\u4f5c\u308c\u308b\u3088\u3046\u306b\u306a\u308b\u306b\u306f\uff0c\u3082\u3046\u5c11\u3057\u77e5\u8b58\u304c\u5fc5\u8981\u3067\u3059\uff0e<\/p>\n<p>\u3055\u3066\u6b21\u56de\u306f\u30c7\u30fc\u30bf\u3092\u52d5\u7684\u306b\u51e6\u7406\u3057\uff0c\u89b3\u5149\u5730\u306e\u30ea\u30b9\u30c8\u3092\u4f5c\u6210\u3057\u3066\u3044\u304d\u307e\u3059\uff01<\/p>\n<p>\u4eca\u56de\u306f\uff0c\u3072\u3068\u3064\u306e\u30c7\u30fc\u30bf\u306b\u5bfe\u3057\u3066\u3057\u304b\u4f5c\u308c\u3066\u3044\u306a\u304b\u3063\u305f\u306e\u3067\uff0c\u6b21\u56de\u3067<strong>\u3088\u308a\u30a2\u30d7\u30ea\u3089\u3057\u304f<\/strong>\u306a\u308b\u3068\u601d\u3044\u307e\u3059\uff0e<\/p>\n<p>\u9811\u5f35\u308a\u307e\u3057\u3087\u3046\uff01<\/p>\n<div style=\"max-width: 450px; height: auto;\"><a href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1440\/\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-1430\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/thum2.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"100%\" height=\"auto\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/thum2.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/thum2-300x182.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/thum2-768x465.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/thum2-1024x620.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u672c\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306f\uff0c\u57fa\u672c\u7684\u306b\u672c\u5bb6SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u306b\u5023\u3063\u3066\u9032\u3081\u3066\u3044\u304d\u307e\u3059\uff0e\u305f\u3060\u516c\u5f0f\u3068\u9055\u3046\u70b9\u306f\u300c\u65e5\u672c\u8a9e\u3067\u3042\u308b\u3053\u3068\u300d\u3068\u300c\u89e3\u8aac\u3092\u7d30\u304b\u304f\u5165\u308c\u3066\u3042\u308b\u3053\u3068\u300d\u3067\u3059\uff0e\u306a\u306e\u3067\uff0c\u521d\u5fc3\u8005\u306f\u3082\u3061\u308d\u3093\uff0c\u4e2d\u7d1a\u8005\u30d7\u30ed\u30b0\u30e9\u30de\u306e\u65b9\u306b\u3082\u6e80\u8db3\u3057\u3066\u3082\u3089\u3048\u308b\u3088\u3046\u306a\u3082\u306e\u3092\u76ee\u6307\u3057\u3066\u3044\u307e\u3059\uff0e\u3055\u3066\u7b2c1\u56de\u76ee\u306fSwiftUI\u306e\u57fa\u672c\u8981\u7d20\u3092\u5b66\u3073\u307e\u3057\u3087\u3046\uff01<\/p>\n","protected":false},"author":1,"featured_media":1428,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[83,81,82],"class_list":["post-1375","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-programming","tag-ios","tag-swift","tag-swiftui"],"_links":{"self":[{"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/posts\/1375","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/comments?post=1375"}],"version-history":[{"count":36,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/posts\/1375\/revisions"}],"predecessor-version":[{"id":1587,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/posts\/1375\/revisions\/1587"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/media\/1428"}],"wp:attachment":[{"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/media?parent=1375"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/categories?post=1375"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/tags?post=1375"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}