{"id":1526,"date":"2021-03-15T16:00:33","date_gmt":"2021-03-15T07:00:33","guid":{"rendered":"http:\/\/hirlab.net\/nblog\/?p=1526"},"modified":"2021-03-15T16:03:17","modified_gmt":"2021-03-15T07:03:17","slug":"%e3%80%90%e7%ac%ac4%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%9b%b3%e5%bd%a2%e3%81%ae%e6%8f%8f%e7%94%bb","status":"publish","type":"post","link":"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1526\/","title":{"rendered":"\u3010\u7b2c4\u56de\u3011\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3010\u56f3\u5f62\u306e\u63cf\u753b\u3011"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_11 counter-hierarchy counter-decimal ez-toc-light-blue\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\">\u30b3\u30f3\u30c6\u30f3\u30c4<\/p>\n<span class=\"ez-toc-title-toggle\"><a class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\"><i class=\"ez-toc-glyphicon ez-toc-icon-toggle\"><\/i><\/a><\/span><\/div>\n<nav><ul class=\"ez-toc-list ez-toc-list-level-1\"><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1526\/#%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\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1526\/#%E7%AC%AC4%E5%9B%9E%EF%BC%9A%E5%9B%B3%E5%BD%A2%E3%81%AE%E6%8F%8F%E7%94%BB\" title=\"\u7b2c4\u56de\uff1a\u56f3\u5f62\u306e\u63cf\u753b\">\u7b2c4\u56de\uff1a\u56f3\u5f62\u306e\u63cf\u753b<\/a><ul class=\"ez-toc-list-level-3\"><li class=\"ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1526\/#Step_1_%E3%83%90%E3%83%83%E3%82%B8%E3%82%92%E4%BB%AE%E3%81%A7%E5%AE%9A%E7%BE%A9%E3%81%99%E3%82%8B\" title=\"Step 1. \u30d0\u30c3\u30b8\u3092\u4eee\u3067\u5b9a\u7fa9\u3059\u308b\">Step 1. \u30d0\u30c3\u30b8\u3092\u4eee\u3067\u5b9a\u7fa9\u3059\u308b<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1526\/#Step_2_%E3%83%90%E3%83%83%E3%82%B8%E8%83%8C%E6%99%AF%E3%81%A7%E4%BD%BF%E3%81%86%E5%85%AD%E8%A7%92%E5%BD%A2%E3%82%92%E5%AE%9A%E7%BE%A9%E3%81%99%E3%82%8B\" title=\"Step 2. \u30d0\u30c3\u30b8\u80cc\u666f\u3067\u4f7f\u3046\u516d\u89d2\u5f62\u3092\u5b9a\u7fa9\u3059\u308b\">Step 2. \u30d0\u30c3\u30b8\u80cc\u666f\u3067\u4f7f\u3046\u516d\u89d2\u5f62\u3092\u5b9a\u7fa9\u3059\u308b<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1526\/#Step_3_Badge%E3%81%A7%E8%83%8C%E6%99%AF%E3%82%92%E6%8F%8F%E7%94%BB%E3%81%97%E3%81%A6%E3%81%BF%E3%82%8B\" title=\"Step 3. Badge\u3067\u80cc\u666f\u3092\u63cf\u753b\u3057\u3066\u307f\u308b\">Step 3. Badge\u3067\u80cc\u666f\u3092\u63cf\u753b\u3057\u3066\u307f\u308b<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1526\/#Step_4_%E3%83%90%E3%83%83%E3%82%B8%E3%82%B7%E3%83%B3%E3%83%9C%E3%83%AB%E3%82%92%E6%8F%8F%E3%81%8F\" title=\"Step 4. \u30d0\u30c3\u30b8\u30b7\u30f3\u30dc\u30eb\u3092\u63cf\u304f\">Step 4. \u30d0\u30c3\u30b8\u30b7\u30f3\u30dc\u30eb\u3092\u63cf\u304f<\/a><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-3\"><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1526\/#Step_5_%E3%83%90%E3%83%83%E3%82%B8%E3%81%AE%E7%B5%84%E3%81%BF%E5%90%88%E3%82%8F%E3%81%9B\" title=\"Step 5. \u30d0\u30c3\u30b8\u306e\u7d44\u307f\u5408\u308f\u305b\">Step 5. \u30d0\u30c3\u30b8\u306e\u7d44\u307f\u5408\u308f\u305b<\/a><\/li><\/ul><\/li><li class=\"ez-toc-page-1 ez-toc-heading-level-2\"><a class=\"ez-toc-link ez-toc-heading-8\" href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1526\/#%E7%AC%AC4%E5%9B%9E%EF%BC%9A%E3%81%8A%E3%82%8F%E3%82%8A%E3%81%AB\" title=\"\u7b2c4\u56de\uff1a\u304a\u308f\u308a\u306b\">\u7b2c4\u56de\uff1a\u304a\u308f\u308a\u306b<\/a><\/li><\/ul><\/nav><\/div>\n<h2><span class=\"ez-toc-section\" id=\"%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\"><\/span>\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><img loading=\"lazy\" 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=\"(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<p>\u7b2c1\u56de\u306f????<\/p>\n<div style=\"max-width: 450px; height: auto;\"><a href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1375\/\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1430\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/thum1.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"100%\" height=\"auto\" \/><\/a><\/div>\n<h2><span class=\"ez-toc-section\" id=\"%E7%AC%AC4%E5%9B%9E%EF%BC%9A%E5%9B%B3%E5%BD%A2%E3%81%AE%E6%8F%8F%E7%94%BB\"><\/span>\u7b2c4\u56de\uff1a\u56f3\u5f62\u306e\u63cf\u753b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u7b2c4\u56de\u3067\u306f\uff0c\u524d\u56de\u4f5c\u6210\u3057\u305f\u30a2\u30d7\u30ea\u304b\u3089\u306f\u5c11\u3057\u96e2\u308c\uff0cSwiftUI\u3067\u306e\u56f3\u5f62\u63cf\u753b\u3092\u4f7f\u3063\u305f\u30d0\u30c3\u30b8\u30d3\u30e5\u30fc\u306e\u89e3\u8aac\u3092\u884c\u3063\u3066\u3044\u304d\u307e\u3059\uff0e<\/p>\n<p>\u3068\u3044\u3063\u3066\u3082\uff0c\u4eca\u56de\u4f5c\u3063\u305f\u30d0\u30c3\u30b8\u306f\u6700\u7d42\u7684\u306b\u306f\u3072\u3068\u3064\u306e\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u306b\u7d71\u5408\u3055\u308c\u308b\u306e\u3067\u3054\u5b89\u5fc3\u304f\u3060\u3055\u3044\uff0e<\/p>\n<p>\u4eca\u56de\u4f5c\u6210\u3059\u308b\u30d0\u30c3\u30b8\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u3067\u3059\uff0e<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_1_%E3%83%90%E3%83%83%E3%82%B8%E3%82%92%E4%BB%AE%E3%81%A7%E5%AE%9A%E7%BE%A9%E3%81%99%E3%82%8B\"><\/span>Step 1. \u30d0\u30c3\u30b8\u3092\u4eee\u3067\u5b9a\u7fa9\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u3044\u304d\u306a\u308a\u8907\u96d1\u306a\u30d0\u30c3\u30b8\u3092\u4f5c\u6210\u3059\u308b\u306e\u306f\u56f0\u96e3\u3067\u3059\u304c\uff0c<strong>\u307e\u305a\u306f\u5927\u67a0\u3092\u4f5c\u3063\u3066\u7c21\u5358\u306a\u30d0\u30c3\u30b8\u306e\u4f5c\u308a\u65b9\u3092\u5b66\u3073\u307e\u3057\u3087\u3046\uff01<\/strong><\/p>\n<p>\u307e\u305a\u306f\u65b0\u305f\u306b\u300cBadge.swift\u300d\u3092\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u4f5c\u6210\u3057\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">import SwiftUI\r\n\r\nstruct Badge: View {\r\n    var body: some View {\r\n        Text(\"Hello, World!\")\r\n    }\r\n}\r\n\r\nstruct Badge_Previews: PreviewProvider {\r\n    static var previews: some View {\r\n        Badge()\r\n    }\r\n}<\/pre>\n<p>\u305d\u3046\u3057\u305f\u3089\uff0c\u65e9\u901f\u7c21\u5358\u306a\u56f3\u5f62\u3092\u4f7f\u3063\u3066\u30d0\u30c3\u30b8\u3092\u4f5c\u308a\u307e\u3059\uff0e<\/p>\n<p>\u901a\u5e38\uff0cSwiftUI\u306e\u56f3\u5f62\u63cf\u753b\u306f\uff0c\u8f2a\u90ed\u60c5\u5831\u306e<span class=\"lang:swift decode:true crayon-inline \">Path<\/span> \u578b (\u69cb\u9020\u4f53) \u3092\u4f7f\u7528\u3057\u3066\u884c\u3044\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift mark:3-5 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct Badge: View {\r\n    var body: some View {\r\n        Path { path in\r\n\r\n        }\r\n    }\r\n}<\/pre>\n<p>\u4eca\u306f\u307e\u3060\u4f55\u3082\u66f8\u3044\u3066\u3044\u307e\u305b\u3093\u304c\uff0c\u3053\u306e<span class=\"lang:swift decode:true crayon-inline \">Path { }<\/span> \u306e\u5f15\u6570\u306b\u56f3\u5f62\u306e\u8f2a\u90ed\u60c5\u5831\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u304f\u5f62\u306b\u306a\u308a\u307e\u3059\uff0e<\/p>\n<p>\u4f8b\u3048\u3070\u76f4\u63a5\uff0c\u4e88\u3081\u7528\u610f\u3055\u308c\u3066\u3044\u308b\u56f3\u5f62\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift mark:4-8 decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct Badge: View {\r\n    var body: some View {\r\n        Path { path in\r\n            path.addRect(CGRect(\r\n                x: 50,\r\n                y: 50,\r\n                width: 100,\r\n                height: 200))\r\n        }\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1528\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-2.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"587\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-2.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-2-300x147.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-2-768x376.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-2-1024x501.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u307e\u305f\u306f\uff0c<strong>\u81ea\u5206\u3067\u9802\u70b9\u5ea7\u6a19\u3092\u5b9a\u3081\u3066\u7d50\u3073\uff0c\u305d\u308c\u3092\u5857\u308a\u3064\u3076\u3059<\/strong>\uff0c\u3068\u3044\u3063\u305f\u3053\u3068\u3082\u53ef\u80fd\u3067\u3059\uff0e<\/p>\n<pre class=\"lang:swift mark:4-10 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct Badge: View {\r\n    var body: some View {\r\n        Path { path in\r\n            path.addLines([\r\n               CGPoint(x: 100, y: 100), \/\/ \u5de6\u4e0a\r\n               CGPoint(x: 200, y: 200), \/\/ \u53f3\u4e0b\r\n               CGPoint(x: 200, y: 100), \/\/ \u53f3\u4e0a\r\n               CGPoint(x: 100, y: 100), \/\/ \u5de6\u4e0a\u306b\u623b\u308b\r\n            ])\r\n        }.stroke()\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1531\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-3-1.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"587\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-3-1.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-3-1-300x147.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-3-1-768x376.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-3-1-1024x501.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<pre class=\"lang:swift mark:10 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct Badge: View {\r\n    var body: some View {\r\n        Path { path in\r\n            path.addLines([\r\n               CGPoint(x: 100, y: 100), \/\/ \u5de6\u4e0a\r\n               CGPoint(x: 200, y: 200), \/\/ \u53f3\u4e0b\r\n               CGPoint(x: 200, y: 100), \/\/ \u53f3\u4e0a\r\n               CGPoint(x: 100, y: 100), \/\/ \u5de6\u4e0a\u306b\u623b\u308b\r\n            ])\r\n        }.fill(Color.green)\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1532\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-4.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"587\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-4.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-4-300x147.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-4-768x376.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-4-1024x501.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u6b21\u306e\u5185\u5bb9\u3092\u7406\u89e3\u3057\u3084\u3059\u304f\u3059\u308b\u305f\u3081\u306b\uff0c\u3082<strong>\u3046\u5c11\u3057\u3060\u3051\u56f3\u5f62\u63cf\u753b\u306e\u57fa\u790e\u3092\u5b66\u3073\u307e\u3057\u3087\u3046<\/strong>\uff0e<\/p>\n<p>\u5148\u307b\u3069\u307e\u3067\u306f\uff0c\u5ea7\u6a19\u3092\u8ffd\u52a0\u3057\u3066\u3044\u304f\u65b9\u6cd5\u3092\u3068\u308a\u307e\u3057\u305f\u304c\uff0c\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u7dda\u306e\u5f15\u304d\u65b9\u3082\u53ef\u80fd\u3067\u3059\uff0e<\/p>\n<pre class=\"lang:swift mark:6,7 decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct Badge: View {\r\n    \r\n    var body: some View {\r\n        Path { path in\r\n            \r\n            path.move(to: CGPoint(x: 100, y: 100))\r\n            path.addLine(to: CGPoint(x: 200, y: 200))\r\n\r\n        }.stroke()\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1540\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-5.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"506\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-5.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-5-300x127.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-5-768x324.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-5-1024x432.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p><span class=\"lang:swift decode:true crayon-inline \">move(to: )<\/span> \u3067\u63cf\u753b\u306e\u59cb\u70b9\u5ea7\u6a19\u3092\u6700\u521d\u306b\u6c7a\u3081\uff0c<span class=\"lang:swift decode:true crayon-inline \">addLine(to: )<\/span>\u00a0\u3067\u7d42\u70b9\u5ea7\u6a19\u3092\u6c7a\u3081\u3066\u7dda\u3092\u5f15\u304f\u65b9\u6cd5\u3067\u3059\uff0e<\/p>\n<p>\u3053\u308c\u3092\u4f7f\u3048\u3070\uff0c<\/p>\n<pre class=\"lang:swift mark:9,10 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct Badge: View {\r\n    \r\n    var body: some View {\r\n        Path { path in\r\n            \r\n            path.move(to: CGPoint(x: 100, y: 100))\r\n            path.addLine(to: CGPoint(x: 200, y: 200))\r\n            \r\n            path.move(to: CGPoint(x: 300, y: 100))\r\n            path.addLine(to: CGPoint(x: 250, y: 200))\r\n\r\n        }.stroke()\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1544\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-6-1.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"506\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-6-1.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-6-1-300x127.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-6-1-768x324.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-6-1-1024x432.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u306e\u3088\u3046\u306a\u63cf\u753b\u3082\u53ef\u80fd\u3067\u3059\uff0e<\/p>\n<p>\u305d\u3057\u3066\u3082\u3046\u4e00\u3064\u91cd\u8981\u306a\u63cf\u753b\u65b9\u6cd5\u3068\u3057\u3066\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u3082\u306e\u304c\u3042\u308a\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift mark:12-15 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct Badge: View {\r\n    \r\n    var body: some View {\r\n        Path { path in\r\n            \r\n            path.move(to: CGPoint(x: 100, y: 100))\r\n            path.addLine(to: CGPoint(x: 200, y: 200))\r\n            \r\n            path.move(to: CGPoint(x: 300, y: 100))\r\n            path.addLine(to: CGPoint(x: 250, y: 200))\r\n            \r\n            path.addQuadCurve(\r\n                to: CGPoint(x: 200, y: 200),\r\n                control: CGPoint(x: 230, y: 230)\r\n            )\r\n\r\n        }.stroke()\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1542\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-7.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"506\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-7.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-7-300x127.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-7-768x324.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-7-1024x432.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u3053\u306e\u3088\u3046\u306a\u30ab\u30fc\u30d6\u306e\u63cf\u753b\u3067\u3059\uff0e<\/p>\n<p>\u4e0a\u8a18\u30b3\u30fc\u30c9\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u30a4\u30e1\u30fc\u30b8\u3067\u3059\uff0e<\/p>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1547\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-8-1.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"760\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-8-1.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-8-1-300x190.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-8-1-768x486.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-8-1-1024x649.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u59cb\u70b9\u306f<span class=\"lang:swift decode:true crayon-inline \">move(to: )<\/span>\u00a0\u306b\u9650\u3089\u305a\uff0c\u6700\u5f8c\u306b\u79fb\u52d5\u3057\u7d42\u3048\u305f\u5ea7\u6a19\u304c\uff0c\u305d\u308c\u306b\u3042\u305f\u308a\u307e\u3059\uff0e<\/p>\n<p>\u4eca\u56de\u306f\u6700\u5f8c\u306e<span class=\"lang:swift decode:true crayon-inline \">path.addLine(to: CGPoint(x: 250, y: 200))<\/span>\u00a0\u3067\u79fb\u52d5\u3057\u305f\u70b9\u304c\uff0c\u30ab\u30fc\u30d6\u306e\u59cb\u70b9\u306b\u306a\u308a\u307e\u3059\u306d\uff0e<\/p>\n<p><strong>\u3053\u308c\u3089\u3092\u8e0f\u307e\u3048\u305f\u4e0a\u3067\uff0c\u672c\u984c\u306b\u79fb\u308a\u307e\u3059\uff0e<\/strong><\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_2_%E3%83%90%E3%83%83%E3%82%B8%E8%83%8C%E6%99%AF%E3%81%A7%E4%BD%BF%E3%81%86%E5%85%AD%E8%A7%92%E5%BD%A2%E3%82%92%E5%AE%9A%E7%BE%A9%E3%81%99%E3%82%8B\"><\/span>Step 2. \u30d0\u30c3\u30b8\u80cc\u666f\u3067\u4f7f\u3046\u516d\u89d2\u5f62\u3092\u5b9a\u7fa9\u3059\u308b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u3055\u3066\uff0c\u80cc\u666f\u3067\u4f7f\u7528\u3059\u308b\u516d\u89d2\u5f62\u3092\u6c7a\u3081\u308b\u30d1\u30e9\u30e1\u30fc\u30bf\u3092\u7ba1\u7406\u3059\u308b\u69cb\u9020\u4f53\u3092\u5b9a\u7fa9\u3057\u307e\u3057\u3087\u3046\uff0e<\/p>\n<p>\u300cHexagonParameters.swift\u300d\u3092\u65b0\u305f\u306b\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u30eb\u30fc\u30c8\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u306b\u4f5c\u6210\u3057\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">import SwiftUI\r\n\r\nstruct HexagonParameters{\r\n\r\n}<\/pre>\n<p>\u5b9f\u969b\uff0c<strong>\u516c\u5f0f\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\u3067\u306f\u5b9a\u7fa9\u306e\u8aac\u660e\u306f\u7686\u7121<\/strong>\u3067\u3059\u304c\uff0c\u5148\u307b\u3069\u306e\u8a71\u3092\u8e0f\u307e\u3048\u3066\u5c11\u3057\u3060\u3051\u89e3\u8aac\u3092\u5165\u308c\u3066\u5b9f\u88c5\u3057\u3066\u307f\u307e\u3059\uff0e<\/p>\n<p>\u3053\u306e\u69cb\u9020\u4f53\u3067\u306f\uff0c\u5404\u9802\u70b9\u5ea7\u6a19\u3092\u7ba1\u7406\u3059\u308b\u306e\u3067\uff0c<span class=\"lang:swift decode:true crayon-inline \">points<\/span>\u00a0 \u3068\u3044\u3046\u30d7\u30ed\u30d1\u30c6\u30a3\u3092\u6301\u305f\u305b\u3066\u3042\u3052\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift mark:5-7 decode:true \" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">import SwiftUI\r\n\r\nstruct HexagonParameters{\r\n\r\n    static let points = [\r\n        \r\n    ]\r\n\r\n}<\/pre>\n<p>\u3053\u3053\u3067\uff0c\u6ce8\u610f\u3068\u3057\u3066\u4eca\u56de\u63cf\u753b\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u308b\u516d\u89d2\u5f62\u306f\u30b3\u30fc\u30ca\u30fc\u304c\u89d2\u5f35\u3063\u305f\u3088\u3046\u306a\u3082\u306e\u3067\u306f\u306a\u304f\uff0c<strong>\u4e38\u307f\u3092\u5e2f\u3073\u305f\u516d\u89d2\u5f62<\/strong>\u3092\u63cf\u753b\u3057\u3088\u3046\u3068\u3057\u3066\u3044\u307e\u3059\uff0e<\/p>\n<p>\u306a\u306e\u3067\uff0c\u5148\u307b\u3069\u51fa\u3066\u304d\u305f\u5236\u5fa1\u70b9\u3068\u7d42\u70b9\u3082\u30d1\u30e9\u30e1\u30fc\u30bf\u3068\u3057\u3066\u7ba1\u7406\u3092\u884c\u3044\u307e\u3059\uff0e<\/p>\n<p>\u305d\u3053\u3067\u305d\u308c\u3089\u3092\u4e00\u3064\u306e\u69cb\u9020\u4f53\u3068\u3057\u3066\u7ba1\u7406\u3057\u3066\u3057\u307e\u3044\u307e\u3057\u3087\u3046\uff0e<\/p>\n<pre class=\"lang:swift mark:2-7 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct HexagonParameters{\r\n    struct Segment {\r\n        let useWidth: (CGFloat, CGFloat, CGFloat)\r\n        let xFactors: (CGFloat, CGFloat, CGFloat)\r\n        let useHeight: (CGFloat, CGFloat, CGFloat)\r\n        let yFactors: (CGFloat, CGFloat, CGFloat)\r\n    }\r\n    ...\r\n}<\/pre>\n<p>\u3053\u308c\u3060\u3051\u3092\u898b\u308b\u3068\uff0c\u305d\u308c\u305e\u308c\u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u304c\u4f55\u3092\u793a\u3057\u3066\u3044\u308b\u306e\u304b\u308f\u304b\u308a\u306b\u304f\u3044\u3067\u3059\u306d\uff0e<\/p>\n<p>\u4f7f\u3044\u65b9\u3068\u3057\u3066\u306f\uff0c\u56f3\u5f62\u306e\u5927\u304d\u3055\u3068\u3057\u3066<span class=\"lang:swift decode:true crayon-inline\">width<\/span>\u00a0\u3068<span class=\"lang:swift decode:true crayon-inline \">height<\/span> \u3068\u3044\u3046\u5b9a\u6570\u3092\u3082\u3068\u306b\u63cf\u753b\u3059\u308b\u3053\u3068\u3092\u8003\u3048\u3066\u3044\u307e\u3059\uff0e<\/p>\n<p>\u305d\u308c\u3089\u306b\u5bfe\u3057\u3066\u305d\u306e\u5b9a\u6570\u3092\u4f7f\u3046\u304b\u5426\u304b (<span class=\"lang:swift decode:true crayon-inline \">useXxx<\/span> ) \uff0c\u305d\u3057\u3066\u3069\u306e\u304f\u3089\u3044\u306e\u4fc2\u6570 (<span class=\"lang:swift decode:true crayon-inline \">xFactor<\/span>\u00a0) \u3067\u63cf\u753b\u3059\u308b\u304b\u3092\u3053\u308c\u3067\u7ba1\u7406\u3057\u3088\u3046\u3068\u3044\u3046\u8003\u3048\u3067\u3059\uff0e<\/p>\n<p>\u307e\u305f\uff0c\u5404\u30bf\u30d7\u30eb\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u306f\u305d\u308c\u305e\u308c\uff0c<span class=\"lang:swift decode:true crayon-inline \">(\"\u59cb\u70b9\", \"\u7d42\u70b9\", \"\u5236\u5fa1\u70b9\")<\/span>\u00a0\u3068\u3057\u3066\u6271\u3046\u3053\u3068\u306b\u3057\u307e\u3059\uff0e<\/p>\n<p>\u305d\u3046\u3057\u305f\u3089\u89d2\u9802\u70b9\u306e\u95a2\u4fc2\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u304d\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift mark:9,12-47 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct HexagonParameters{\r\n    struct Segment {\r\n        let useWidth: (CGFloat, CGFloat, CGFloat)\r\n        let xFactors: (CGFloat, CGFloat, CGFloat)\r\n        let useHeight: (CGFloat, CGFloat, CGFloat)\r\n        let yFactors: (CGFloat, CGFloat, CGFloat)\r\n    }\r\n    \r\n    static let adjustment: CGFloat = 0.085\r\n\r\n    static let points = [\r\n         Segment(\r\n                useWidth:  (1.00, 1.00, 1.00),\r\n                xFactors:  (0.60, 0.40, 0.50),\r\n                useHeight: (1.00, 1.00, 0.00),\r\n                yFactors:  (0.05, 0.05, 0.00)\r\n               ),\r\n           Segment(\r\n               useWidth:  (1.00, 1.00, 0.00),\r\n               xFactors:  (0.05, 0.00, 0.00),\r\n               useHeight: (1.00, 1.00, 1.00),\r\n               yFactors:  (0.20 + adjustment, 0.30 + adjustment, 0.25 + adjustment)\r\n           ),\r\n           Segment(\r\n               useWidth:  (1.00, 1.00, 0.00),\r\n               xFactors:  (0.00, 0.05, 0.00),\r\n               useHeight: (1.00, 1.00, 1.00),\r\n               yFactors:  (0.70 - adjustment, 0.80 - adjustment, 0.75 - adjustment)\r\n           ),\r\n           Segment(\r\n               useWidth:  (1.00, 1.00, 1.00),\r\n               xFactors:  (0.40, 0.60, 0.50),\r\n               useHeight: (1.00, 1.00, 1.00),\r\n               yFactors:  (0.95, 0.95, 1.00)\r\n           ),\r\n           Segment(\r\n               useWidth:  (1.00, 1.00, 1.00),\r\n               xFactors:  (0.95, 1.00, 1.00),\r\n               useHeight: (1.00, 1.00, 1.00),\r\n               yFactors:  (0.80 - adjustment, 0.70 - adjustment, 0.75 - adjustment)\r\n           ),\r\n           Segment(\r\n               useWidth:  (1.00, 1.00, 1.00),\r\n               xFactors:  (1.00, 0.95, 1.00),\r\n               useHeight: (1.00, 1.00, 1.00),\r\n               yFactors:  (0.30 + adjustment, 0.20 + adjustment, 0.25 + adjustment)\r\n           )\r\n    ]\r\n}<\/pre>\n<p>\u3044\u304d\u306a\u308a\uff0c\u30b3\u30fc\u30c9\u304c\u5897\u3048\u307e\u3057\u305f\u304c<strong>\u3053\u3053\u306f\u30b3\u30d4\u30da\u3067\u69cb\u3044\u307e\u305b\u3093<\/strong>\uff0e<\/p>\n<p>\u3053\u306e\u5f8c\uff0c\u3053\u308c\u3092\u547c\u3073\u51fa\u3057\u306a\u304c\u3089\u69d8\u5b50\u3092\u7406\u89e3\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff0e<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_3_Badge%E3%81%A7%E8%83%8C%E6%99%AF%E3%82%92%E6%8F%8F%E7%94%BB%E3%81%97%E3%81%A6%E3%81%BF%E3%82%8B\"><\/span>Step 3. Badge\u3067\u80cc\u666f\u3092\u63cf\u753b\u3057\u3066\u307f\u308b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u305d\u3046\u3057\u305f\u3089\uff0c\u5148\u307b\u3069\u306e\u516d\u89d2\u5f62\u3092\u80cc\u666f\u3068\u3057\u3066\u63cf\u753b\u3057\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff0e<\/p>\n<pre class=\"lang:swift decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct Badge: View {\r\n    \r\n    var body: some View {\r\n        Path { path in\r\n            let width: CGFloat = 100.0\r\n            let height = width\r\n            \r\n            path.move(\r\n                to: CGPoint(\r\n                    x: width * 0.95,\r\n                    y: height * (0.20 + HexagonParameters.adjustment)\r\n                )\r\n            )\r\n            \r\n            HexagonParameters.points.forEach {\r\n                path.addLine(\r\n                    to: .init(\r\n                        x: width * $0.useWidth.0 * $0.xFactors.0,\r\n                        y: height * $0.useHeight.0 * $0.yFactors.0\r\n                    )\r\n                )\r\n\r\n                path.addQuadCurve(\r\n                    to: .init(\r\n                        x: width * $0.useWidth.1 * $0.xFactors.1,\r\n                        y: height * $0.useHeight.1 * $0.yFactors.1\r\n                    ),\r\n                    control: .init(\r\n                        x: width * $0.useWidth.2 * $0.xFactors.2,\r\n                        y: height * $0.useHeight.2 * $0.yFactors.2\r\n                    )\r\n                )\r\n            }\r\n        }.stroke()\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1550\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-9.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"769\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-9.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-9-300x192.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-9-768x492.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-9-1024x656.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u3046\u307e\u304f\u63cf\u753b\u3067\u304d\u3066\u3044\u305d\u3046\u3067\u3059\uff01<\/p>\n<p>\u3053\u3053\u3067\uff0c<span class=\"lang:swift decode:true crayon-inline \">HexagonParameters.points.forEach { }<\/span>\u00a0\u306f<strong>\u30ea\u30b9\u30c8\u306b\u5bfe\u3057\u3066\u5404\u8981\u7d20\u3092\u30af\u30ed\u30fc\u30b8\u30e3\u306e\u5f15\u6570\u3068\u3057\u3066\u51e6\u7406\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u95a2\u6570<\/strong>\u3067\u3059\uff0e<\/p>\n<p>\u4eca\u56de\u306f\u5f15\u6570\u540d\u306f\u6307\u5b9a\u3057\u3066\u3044\u306a\u3044\u306e\u3067\uff0c<span class=\"lang:swift decode:true crayon-inline \">$0<\/span>\u00a0\u3067\u4ee3\u7528\u3067\u304d\u307e\u3059\uff0e<\/p>\n<p>\u307e\u305f\uff0c\u30bf\u30d7\u30eb\u306e\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u3057\u3066\u3044\u3057\u305f\u30a2\u30af\u30bb\u30b9\u306e\u4ed5\u65b9\u3082\uff0c\u30b3\u30fc\u30c9\u3092\u898b\u308c\u3070\u5206\u304b\u308b\u304b\u3068\u601d\u3044\u307e\u3059\uff0e<\/p>\n<p>\u30af\u30ed\u30fc\u30b8\u30e3\u306e\u4e2d\u3067\u3084\u3063\u3066\u3044\u308b\u3053\u3068\u306f\uff0c\u300c\u7dda\u3092\u5f15\u304f\u300d\u2192\u300c\u66f2\u7dda\u3092\u5f15\u304f\u300d\u306e\u7e70\u308a\u8fd4\u3057\u3067\u3059\u306d\uff0e<\/p>\n<p>\u3053\u306e\u3068\u304d\uff0c\u7dda\u3092\u5f15\u3051\u3070\u4eca\u898b\u3066\u3044\u308b\u5ea7\u6a19\u3082\u305d\u308c\u306b\u4f34\u3044\u79fb\u52d5\u3059\u308b\u306e\u3067\uff0c<span class=\"lang:swift decode:true crayon-inline\">move(to: )<\/span>\u00a0\u3082\u6700\u521d\u3060\u3051\u3067\u3059\uff0e<\/p>\n<p>(<span class=\"lang:swift decode:true crayon-inline\">move(to: )<\/span>\u306e\u5ea7\u6a19\u3067\u5b9a\u6570\u304c\u4f7f\u308f\u308c\u3066\u3044\u308b\u306e\u304c\u5c11\u3057\u6c17\u6301\u3061\u60aa\u3044\u3067\u3059\u304c\uff0c\u3053\u308c\u306f\u4ed5\u65b9\u304c\u306a\u3044\u306e\u3067\u30b9\u30eb\u30fc\u3057\u307e\u3059)<\/p>\n<p>&nbsp;<\/p>\n<p>\u3055\u3066\uff0c\u4eca\u306f\u5de6\u4e0a\u306b\u5bc4\u3063\u305f\u516d\u89d2\u5f62\u304c\u63cf\u753b\u3055\u308c\u3066\u3044\u307e\u3059\u304c\uff0c\u3053\u308c\u3092\u753b\u9762\u5168\u4f53\u3092\u4f7f\u3063\u305f\u5927\u304d\u306a\u30b5\u30a4\u30ba\u3067\u63cf\u753b\u3092\u3057\u305f\u3044\u3068\u8003\u3048\u3066\u3044\u307e\u3059\uff0e<\/p>\n<p>\u3053\u3046\u3044\u3063\u305f\u6642\u306f\uff0c<span class=\"lang:swift decode:true crayon-inline\">GeometryReader { }<\/span>\u00a0\u3068\u3044\u3046\u69cb\u9020\u4f53\u304c\u5229\u7528\u3067\u304d\u307e\u3059\uff0e<\/p>\n<p>\u4f7f\u3044\u65b9\u306f\u30b3\u30fc\u30c9\u3092\u5b9f\u969b\u306b\u898b\u3066\u307f\u307e\u3057\u3087\u3046\uff0e<\/p>\n<pre class=\"lang:swift mark:5,7,37 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct Badge: View {\r\n    \r\n    var body: some View {\r\n        \r\n        GeometryReader{ geometry in\r\n            Path { path in\r\n                let width: CGFloat = min(geometry.size.width, geometry.size.height)\r\n                let height = width\r\n                \r\n                path.move(\r\n                    to: CGPoint(\r\n                        x: width * 0.95,\r\n                        y: height * (0.20 + HexagonParameters.adjustment)\r\n                    )\r\n                )\r\n                \r\n                HexagonParameters.points.forEach {\r\n                    path.addLine(\r\n                        to: .init(\r\n                            x: width * $0.useWidth.0 * $0.xFactors.0,\r\n                            y: height * $0.useHeight.0 * $0.yFactors.0\r\n                        )\r\n                    )\r\n\r\n                    path.addQuadCurve(\r\n                        to: .init(\r\n                            x: width * $0.useWidth.1 * $0.xFactors.1,\r\n                            y: height * $0.useHeight.1 * $0.yFactors.1\r\n                        ),\r\n                        control: .init(\r\n                            x: width * $0.useWidth.2 * $0.xFactors.2,\r\n                            y: height * $0.useHeight.2 * $0.yFactors.2\r\n                        )\r\n                    )\r\n                }\r\n            }.stroke()\r\n        }\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1552\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-10.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"769\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-10.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-10-300x192.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-10-768x492.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-10-1024x656.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u3053\u306e\u3088\u3046\u306b\uff0c\u89aa\u30d3\u30e5\u30fc\u306e\u30b5\u30a4\u30ba\u3084\u4e2d\u5fc3\u5ea7\u6a19\u306a\u3069\u3092\u7c21\u5358\u306b\u6271\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u304c\uff0c<span class=\"lang:swift decode:true crayon-inline \">GeometryReader { }<\/span>\u00a0\u3067\u3059\uff0e<\/p>\n<p>\u4eca\u56de\u306f\uff0c\u5e45\u3092\u30d3\u30e5\u30fc\u7e26\u6a2a\u30b5\u30a4\u30ba\u306e\u3046\u3061\uff0c\u5c0f\u3055\u3044\u65b9\u306b\u6307\u5b9a\u3057\u3066\u3044\u307e\u3059\uff0e<\/p>\n<p>\u3055\u3066\u3082\u3046\u5c11\u3057\u30c7\u30b6\u30a4\u30f3\u3092\u6574\u3048\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff0e<\/p>\n<p>\u307e\u305a\u306fx\u8ef8\u306b\u5bfe\u3057\u3066\u4f59\u767d\u3092\u53d6\u308a\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift mark:10-12,16,24,31,35 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct Badge: View {\r\n    \r\n    var body: some View {\r\n        \r\n        GeometryReader{ geometry in\r\n            Path { path in\r\n                var width: CGFloat = min(geometry.size.width, geometry.size.height)\r\n                let height = width\r\n                \r\n                let xScale: CGFloat = 0.832\r\n                let xOffset = (width * (1.0 - xScale)) \/ 2.0\r\n                width *= xScale\r\n                \r\n                path.move(\r\n                    to: CGPoint(\r\n                        x: xOffset + width * 0.95,\r\n                        y: height * (0.20 + HexagonParameters.adjustment)\r\n                    )\r\n                )\r\n                \r\n                HexagonParameters.points.forEach {\r\n                    path.addLine(\r\n                        to: .init(\r\n                            x: xOffset + width * $0.useWidth.0 * $0.xFactors.0,\r\n                            y: height * $0.useHeight.0 * $0.yFactors.0\r\n                        )\r\n                    )\r\n\r\n                    path.addQuadCurve(\r\n                        to: .init(\r\n                            x: xOffset + width * $0.useWidth.1 * $0.xFactors.1,\r\n                            y: height * $0.useHeight.1 * $0.yFactors.1\r\n                        ),\r\n                        control: .init(\r\n                            x: xOffset + width * $0.useWidth.2 * $0.xFactors.2,\r\n                            y: height * $0.useHeight.2 * $0.yFactors.2\r\n                        )\r\n                    )\r\n                }\r\n            }.stroke()\r\n        }\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1554\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-11.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"769\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-11.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-11-300x192.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-11-768x492.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-11-1024x656.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3\u30ab\u30e9\u30fc\u3067\u5857\u308a\u3064\u3076\u3057\u3066\u307f\u307e\u3057\u3087\u3046\uff0e<\/p>\n<pre class=\"lang:swift mark:40-43,47,48 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct Badge: View {\r\n    \r\n    var body: some View {\r\n        \r\n        GeometryReader{ geometry in\r\n            Path { path in\r\n                var width: CGFloat = min(geometry.size.width, geometry.size.height)\r\n                let height = width\r\n                \r\n                let xScale: CGFloat = 0.832\r\n                let xOffset = (width * (1.0 - xScale)) \/ 2.0\r\n                width *= xScale\r\n                \r\n                path.move(\r\n                    to: CGPoint(\r\n                        x: xOffset + width * 0.95,\r\n                        y: height * (0.20 + HexagonParameters.adjustment)\r\n                    )\r\n                )\r\n                \r\n                HexagonParameters.points.forEach {\r\n                    path.addLine(\r\n                        to: .init(\r\n                            x: xOffset + width * $0.useWidth.0 * $0.xFactors.0,\r\n                            y: height * $0.useHeight.0 * $0.yFactors.0\r\n                        )\r\n                    )\r\n\r\n                    path.addQuadCurve(\r\n                        to: .init(\r\n                            x: xOffset + width * $0.useWidth.1 * $0.xFactors.1,\r\n                            y: height * $0.useHeight.1 * $0.yFactors.1\r\n                        ),\r\n                        control: .init(\r\n                            x: xOffset + width * $0.useWidth.2 * $0.xFactors.2,\r\n                            y: height * $0.useHeight.2 * $0.yFactors.2\r\n                        )\r\n                    )\r\n                }\r\n            }.fill(LinearGradient(\r\n                gradient: .init(colors: [Self.gradientStart, Self.gradientEnd]),\r\n                startPoint: .init(x: 0.5, y: 0),\r\n                endPoint: .init(x: 0.5, y: 0.6)\r\n            ))\r\n        }\r\n    }\r\n    static let gradientStart = Color(red: 239.0 \/ 255, green: 120.0 \/ 255, blue: 221.0 \/ 255)\r\n    static let gradientEnd = Color(red: 239.0 \/ 255, green: 172.0 \/ 255, blue: 120.0 \/ 255)\r\n}<\/pre>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1557\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-12.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"769\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-12.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-12-300x192.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-12-768x492.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-12-1024x656.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u8272\u306e\u6307\u5b9a\u306f\uff0c0~255\u306e\u7bc4\u56f2\u3067\u6307\u5b9a\u3057\u305f\u3044\u304c\u305f\u3081\u306b\uff0c<span class=\"lang:swift decode:true crayon-inline \">red: 239.0 \/ 255,<\/span> \u306e\u3088\u3046\u306a\u66f8\u304d\u65b9\u3092\u3057\u3066\u3044\u307e\u3059\u304c\uff0c<strong>\u516c\u5f0f\u3067\u3053\u3046\u66f8\u304f\u304f\u3089\u3044\u306a\u3089\u6700\u521d\u304b\u3089\u305d\u3046\u5b9a\u7fa9\u3059\u308c\u3070\u826f\u304b\u3063\u305f\u306e\u3067\u306f\uff1f<\/strong>\u3068\u79c1\u306f\u601d\u3044\u307e\u3059\u304c\uff0c\u307e\u3042\u826f\u3044\u3067\u3057\u3087\u3046\uff0e<\/p>\n<p>\u4eca\u56de\u306e\u52a0\u7b46\u30b3\u30fc\u30c9\u3067\u30b0\u30e9\u30c7\u30fc\u30b7\u30e7\u30f3\u306e\u5857\u308a\u3064\u3076\u3057\u306e\u4ed5\u65b9\u3082\u308f\u304b\u308a\u307e\u3057\u305f\u306d\uff0e<\/p>\n<p>\u6700\u5f8c\u306b\uff0c\u6700\u5f8c\u306b\u30a2\u30b9\u30da\u30af\u30c8\u6bd4\u3092\u6a2a\u5e45\u306b\u5408\u308f\u305b\uff0c\u30d3\u30e5\u30fc\u306b\u30d5\u30a3\u30c3\u30c8\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift mark:45 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct Badge: View {\r\n    \r\n    var body: some View {\r\n        \r\n        GeometryReader{ geometry in\r\n            Path { path in\r\n                var width: CGFloat = min(geometry.size.width, geometry.size.height)\r\n                let height = width\r\n                \r\n                let xScale: CGFloat = 0.832\r\n                let xOffset = (width * (1.0 - xScale)) \/ 2.0\r\n                width *= xScale\r\n                \r\n                path.move(\r\n                    to: CGPoint(\r\n                        x: xOffset + width * 0.95,\r\n                        y: height * (0.20 + HexagonParameters.adjustment)\r\n                    )\r\n                )\r\n                \r\n                HexagonParameters.points.forEach {\r\n                    path.addLine(\r\n                        to: .init(\r\n                            x: xOffset + width * $0.useWidth.0 * $0.xFactors.0,\r\n                            y: height * $0.useHeight.0 * $0.yFactors.0\r\n                        )\r\n                    )\r\n\r\n                    path.addQuadCurve(\r\n                        to: .init(\r\n                            x: xOffset + width * $0.useWidth.1 * $0.xFactors.1,\r\n                            y: height * $0.useHeight.1 * $0.yFactors.1\r\n                        ),\r\n                        control: .init(\r\n                            x: xOffset + width * $0.useWidth.2 * $0.xFactors.2,\r\n                            y: height * $0.useHeight.2 * $0.yFactors.2\r\n                        )\r\n                    )\r\n                }\r\n            }.fill(LinearGradient(\r\n                gradient: .init(colors: [Self.gradientStart, Self.gradientEnd]),\r\n                startPoint: .init(x: 0.5, y: 0),\r\n                endPoint: .init(x: 0.5, y: 0.6)\r\n            ))\r\n            .aspectRatio(1, contentMode: .fit)\r\n        }\r\n    }\r\n    static let gradientStart = Color(red: 239.0 \/ 255, green: 120.0 \/ 255, blue: 221.0 \/ 255)\r\n    static let gradientEnd = Color(red: 239.0 \/ 255, green: 172.0 \/ 255, blue: 120.0 \/ 255)\r\n}<\/pre>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1559\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-13.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"769\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-13.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-13-300x192.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-13-768x492.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-13-1024x656.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u826f\u3044\u611f\u3058\u3067\u3059\u306d\uff0e<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_4_%E3%83%90%E3%83%83%E3%82%B8%E3%82%B7%E3%83%B3%E3%83%9C%E3%83%AB%E3%82%92%E6%8F%8F%E3%81%8F\"><\/span>Step 4. \u30d0\u30c3\u30b8\u30b7\u30f3\u30dc\u30eb\u3092\u63cf\u304f<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u6b21\u306b\uff0c\u5148\u307b\u3069\u306e\u80cc\u666f\u306e\u4e0a\u306b\u63cf\u304f\u30b7\u30f3\u30dc\u30eb\u3092\u63cf\u753b\u3057\u3066\u3044\u304d\u307e\u3059\u304c\uff0c\u3053\u3053\u3067\u306f<strong>\u4e00\u3064\u306e\u56f3\u5f62\u3092\u8907\u88fd\u3057\uff0c\u56de\u8ee2\u306a\u3069\u306e\u64cd\u4f5c\u3092\u7d44\u307f\u5408\u308f\u305b\u4e00\u3064\u306e\u30d0\u30c3\u30b8\u3092\u63cf\u304f<\/strong>\u3053\u3068\u3092\u3084\u3063\u3066\u307f\u307e\u3059\uff0e<\/p>\n<p>\u307e\u305a\u306f\u305d\u306e\u56f3\u5f62\u3092\u4f5c\u308a\u307e\u3057\u3087\u3046\uff0e<\/p>\n<p>\u3053\u306e\u56f3\u5f62\u306b\u3064\u3044\u3066\u306f\uff0c\u30b3\u30fc\u30c9\u306f\u8907\u96d1\u306b\u898b\u3048\u307e\u3059\u304c\u3084\u3063\u3066\u3044\u308b\u3053\u3068\u306f\u30b7\u30f3\u30d7\u30eb\u3067\u3059\u306e\u3067\uff0c\u8a73\u7d30\u306f\u7701\u304d\u307e\u3059\uff0e<\/p>\n<p>\u3053\u3053\u306f\u30b3\u30d4\u30da\u3067\u3082\u69cb\u308f\u306a\u3044\u3067\u3059\uff0e<\/p>\n<pre class=\"lang:swift mark:6-23 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">import SwiftUI\r\n\r\nstruct BadgeSymbol: View {\r\n    var body: some View {\r\n        \r\n        GeometryReader { geometry in\r\n            Path { path in\r\n                let width = min(geometry.size.width, geometry.size.height)\r\n                let height = width * 0.75\r\n                let spacing = width * 0.03\r\n                let middle = width \/ 2\r\n                let topWidth = 0.226 * width\r\n                let topHeight = 0.488 * height\r\n                \r\n                path.addLines([\r\n                    CGPoint(x: middle, y: spacing),\r\n                    CGPoint(x: middle - topWidth, y: topHeight - spacing),\r\n                    CGPoint(x: middle, y: topHeight \/ 2 + spacing),\r\n                    CGPoint(x: middle + topWidth, y: topHeight - spacing),\r\n                    CGPoint(x: middle, y: spacing)\r\n                ])\r\n            }\r\n        }\r\n        \r\n    }\r\n}\r\n\r\nstruct BadgeSymbol_Previews: PreviewProvider {\r\n    static var previews: some View {\r\n        BadgeSymbol()\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1562\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-14.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"769\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-14.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-14-300x192.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-14-768x492.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-14-1024x656.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/>(\u4e0a\u56f3\u3067\u306f<span class=\"lang:swift decode:true crayon-inline \">let height = width * 0.85<\/span>\u00a0\u3068\u306a\u3063\u3066\u3044\u307e\u3059\u304c\uff0c\u672c\u5f53\u306f<span class=\"lang:swift decode:true crayon-inline \">let height = width * 0.75<\/span> \u3067\u3059\uff0e\u7b46\u8005\u306f\u9014\u4e2d\u3067\u6c17\u3065\u3044\u3066\u4fee\u6b63\u3057\u307e\u3059\u306e\u3067\uff0c\u307f\u306a\u3055\u307e\u306f\u9593\u9055\u308f\u306a\u3044\u3088\u3046\u306b... )<\/p>\n<p>\u304b\u306a\u308a\u6c7a\u3081\u6253\u3061\u306a\u5024\u304c\u591a\u3044\u3067\u3059\u304c\uff0c\u3053\u3053\u3067\u305d\u308c\u3089\u306e\u6570\u5b57\u3092\u9069\u5f53\u306b\u5909\u3048\u3066\u307f\u3066\uff0c\u63cf\u753b\u306b\u3069\u306e\u3088\u3046\u306a\u5909\u5316\u304c\u3042\u308b\u304b\u78ba\u304b\u3081\u3066\u307f\u308b\u3068\u826f\u3044\u3067\u3057\u3087\u3046\uff0e<\/p>\n<pre class=\"lang:swift mark:21-28 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct BadgeSymbol: View {\r\n    var body: some View {\r\n        \r\n        GeometryReader { geometry in\r\n            Path { path in\r\n                let width = min(geometry.size.width, geometry.size.height)\r\n                let height = width * 0.75\r\n                let spacing = width * 0.03\r\n                let middle = width \/ 2\r\n                let topWidth = 0.226 * width\r\n                let topHeight = 0.488 * height\r\n                \r\n                path.addLines([\r\n                    CGPoint(x: middle, y: spacing),\r\n                    CGPoint(x: middle - topWidth, y: topHeight - spacing),\r\n                    CGPoint(x: middle, y: topHeight \/ 2 + spacing),\r\n                    CGPoint(x: middle + topWidth, y: topHeight - spacing),\r\n                    CGPoint(x: middle, y: spacing)\r\n                ])\r\n                \r\n                path.move(to: CGPoint(x: middle, y: topHeight \/ 2 + spacing * 3))\r\n                path.addLines([\r\n                    CGPoint(x: middle - topWidth, y: topHeight + spacing),\r\n                    CGPoint(x: spacing, y: height - spacing),\r\n                    CGPoint(x: width - spacing, y: height - spacing),\r\n                    CGPoint(x: middle + topWidth, y: topHeight + spacing),\r\n                    CGPoint(x: middle, y: topHeight \/ 2 + spacing * 3)\r\n                ])\r\n            }\r\n        }\r\n        \r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1564\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-15.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"769\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-15.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-15-300x192.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-15-768x492.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-15-1024x656.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<pre class=\"lang:swift mark:2,32 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct BadgeSymbol: View {\r\n    static let symbolColor = Color(red: 79.0 \/ 255, green: 79.0 \/ 255, blue: 191.0 \/ 255)\r\n    \r\n    var body: some View {\r\n        \r\n        GeometryReader { geometry in\r\n            Path { path in\r\n                let width = min(geometry.size.width, geometry.size.height)\r\n                let height = width * 0.75\r\n                let spacing = width * 0.03\r\n                let middle = width \/ 2\r\n                let topWidth = 0.226 * width\r\n                let topHeight = 0.488 * height\r\n                \r\n                path.addLines([\r\n                    CGPoint(x: middle, y: spacing),\r\n                    CGPoint(x: middle - topWidth, y: topHeight - spacing),\r\n                    CGPoint(x: middle, y: topHeight \/ 2 + spacing),\r\n                    CGPoint(x: middle + topWidth, y: topHeight - spacing),\r\n                    CGPoint(x: middle, y: spacing)\r\n                ])\r\n                \r\n                path.move(to: CGPoint(x: middle, y: topHeight \/ 2 + spacing * 3))\r\n                path.addLines([\r\n                    CGPoint(x: middle - topWidth, y: topHeight + spacing),\r\n                    CGPoint(x: spacing, y: height - spacing),\r\n                    CGPoint(x: width - spacing, y: height - spacing),\r\n                    CGPoint(x: middle + topWidth, y: topHeight + spacing),\r\n                    CGPoint(x: middle, y: topHeight \/ 2 + spacing * 3)\r\n                ])\r\n            }\r\n            .fill(Self.symbolColor)\r\n        }\r\n        \r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1566\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-16.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"769\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-16.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-16-300x192.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-16-768x492.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-16-1024x656.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u3053\u308c\u3067\uff0c\u5143\u3068\u306a\u308b\u56f3\u306f\u5b8c\u6210\u3067\u3059\uff0e<\/p>\n<p>\u3053\u308c\u3092\u7d44\u307f\u5408\u308f\u305b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff0e<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Step_5_%E3%83%90%E3%83%83%E3%82%B8%E3%81%AE%E7%B5%84%E3%81%BF%E5%90%88%E3%82%8F%E3%81%9B\"><\/span>Step 5. \u30d0\u30c3\u30b8\u306e\u7d44\u307f\u5408\u308f\u305b<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>\u307e\u305a\uff0c\u308f\u304b\u308a\u3084\u3059\u304f\u3059\u308b\u305f\u3081\u306bStep 2\u3067\u4f5c\u6210\u3057\u305f\u300cBadge.swift\u300d\u3092\u300cBadgeBackground.swift\u300d\u306b\u540d\u524d\u3092\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\uff0e<\/p>\n<p>\u305d\u306e\u6b21\u306b\uff0cBadgeSymbol\u306e\u56de\u8ee2\u64cd\u4f5c\u3092\u7c21\u5358\u306b\u3059\u308b\u305f\u3081\u306b\u300cRotatedBadgeSymbol.swift\u300d\u3092\u4f5c\u6210\u3057\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift mark:4,7-9,16 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">import SwiftUI\r\n\r\nstruct RotatedBadgeSymbol: View {\r\n    let angle: Angle\r\n    \r\n    var body: some View {\r\n        BadgeSymbol()\r\n            .padding(-60)\r\n            .rotationEffect(angle, anchor: .bottom)\r\n    }\r\n    \r\n}\r\n\r\nstruct RotatedBadgeSymbol_Previews: PreviewProvider {\r\n    static var previews: some View {\r\n        RotatedBadgeSymbol(angle: .init(degrees: 5))\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1569\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-17.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"769\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-17.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-17-300x192.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-17-768x492.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-17-1024x656.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u30d7\u30ec\u30d3\u30e5\u30fc\u3067\u306f\u4eee\u3067\uff0c\u300c5\u5ea6\u56de\u8ee2\u300d\u3068\u3057\u3066\u3044\u307e\u3059\uff0e<\/p>\n<p>\u305d\u306e\u6b21\u306b\uff0c\u307e\u305f\u65b0\u305f\u306b\u300cBadge.swift\u300d\u3092\u4f5c\u6210\u3057\uff0c\u3053\u3053\u3067\u5148\u307b\u3069\u4f5c\u3063\u305f\u30d1\u30fc\u30c4\u305f\u3061\u3092\u547c\u3073\u51fa\u3057\u3066\u3044\u304d\u307e\u3059\uff0e<\/p>\n<p>\u307e\u305a\u306f\u9069\u5f53\u306b\u547c\u3073\u51fa\u3057\u3066\u307f\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift mark:4-7,10-14 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">import SwiftUI\r\n\r\nstruct Badge: View {\r\n    var badgeSymbols: some View {\r\n        RotatedBadgeSymbol(angle: .init(degrees: 0))\r\n            .opacity(0.5)  \/\/ \u900f\u904e\u5ea6\r\n    }\r\n    \r\n    var body: some View {\r\n        ZStack {\r\n            BadgeBackground()\r\n            \r\n            self.badgeSymbols\r\n        }\r\n    }\r\n}\r\n\r\nstruct Badge_Previews: PreviewProvider {\r\n    static var previews: some View {\r\n        Badge()\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1570\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-18.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"769\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-18.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-18-300x192.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-18-768x492.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-18-1024x656.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u30d0\u30c3\u30b8\u30b7\u30f3\u30dc\u30eb\u3092\uff0c\u307e\u305f<span class=\"lang:swift decode:true crayon-inline \">GeometryReader { }<\/span>\u00a0\u3092\u4f7f\u3063\u3066\u30b5\u30a4\u30ba\u8abf\u6574\u3057\u307e\u3057\u3087\u3046\uff0e<\/p>\n<pre class=\"lang:swift mark:11-15 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct Badge: View {\r\n    var badgeSymbols: some View {\r\n        RotatedBadgeSymbol(angle: .init(degrees: 0))\r\n            .opacity(0.5)\r\n    }\r\n    \r\n    var body: some View {\r\n        ZStack {\r\n            BadgeBackground()\r\n            \r\n            GeometryReader { geometry in\r\n                self.badgeSymbols\r\n                    .scaleEffect(1.0 \/ 4.0, anchor: .top)\r\n                    .position(x: geometry.size.width \/ 2.0, y: (3.0 \/ 4.0) * geometry.size.height)\r\n            }\r\n        }\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1575\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-19.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"769\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-19.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-19-300x192.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-19-768x492.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-19-1024x656.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/>(\u3053\u3053\u3067\uff0c\u5148\u307b\u3069\u306e\u5b9a\u6570\u304c\u9055\u3046\u3068\u6c17\u304c\u3064\u304d\u307e\u3057\u305f\uff0e\u6c57)<\/p>\n<p>\u6700\u5f8c\u306b\uff0c\u30b7\u30f3\u30dc\u30eb\u3092\u91cf\u7523\u3057\u307e\u3057\u3087\u3046\uff0e<\/p>\n<p>\u4eca\u56de\u306f8\u5206\u5272\u306b\u3057\u3066\u5186\u5f62\u306b\u63cf\u753b\u3057\u3066\u307f\u307e\u3059\uff0e<\/p>\n<pre class=\"lang:swift mark:2,5-10,23 decode:true\" title=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\">struct Badge: View {\r\n    static let rotationCount = 8\r\n    \r\n    var badgeSymbols: some View {\r\n        ForEach(0..&lt;Badge.rotationCount) { i in\r\n            RotatedBadgeSymbol(\r\n                angle: .degrees(Double(i) \/ Double(Badge.rotationCount)) * 360.0\r\n            )\r\n        }\r\n        .opacity(0.5)\r\n    }\r\n    \r\n    var body: some View {\r\n        ZStack {\r\n            BadgeBackground()\r\n            \r\n            GeometryReader { geometry in\r\n                self.badgeSymbols\r\n                    .scaleEffect(1.0 \/ 4.0, anchor: .top)\r\n                    .position(x: geometry.size.width \/ 2.0, y: (3.0 \/ 4.0) * geometry.size.height)\r\n            }\r\n        }\r\n        .scaledToFit()\r\n    }\r\n}<\/pre>\n<p><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1577\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-20.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"769\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-20.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-20-300x192.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-20-768x492.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/4-20-1024x656.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/p>\n<p>\u3053\u308c\u3067\u30d0\u30c3\u30b8\u5b8c\u6210\u3067\u3059\uff01<\/p>\n<p>\u3053\u306e\u30d0\u30c3\u30b8\u306f\u307e\u305f\u3044\u305a\u308c\u30a2\u30d7\u30ea\u3067\u4f7f\u7528\u3059\u308b\u306e\u3067\u3053\u306e\u307e\u307e\u306b\u3057\u3066\u304a\u3044\u3066\u304f\u3060\u3055\u3044\uff01<\/p>\n<h2><span class=\"ez-toc-section\" id=\"%E7%AC%AC4%E5%9B%9E%EF%BC%9A%E3%81%8A%E3%82%8F%E3%82%8A%E3%81%AB\"><\/span>\u7b2c4\u56de\uff1a\u304a\u308f\u308a\u306b<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>\u4eca\u56de\u306f\uff0c\u56f3\u5f62\u306e\u63cf\u753b\u306b\u3064\u3044\u3066\u7d39\u4ecb\u3057\u307e\u3057\u305f\uff0e<\/p>\n<p>\u524d\u56de\u307e\u3067\u3068\u6bdb\u8272\u304c\u5909\u308f\u308a\uff0c\u56f0\u60d1\u3057\u305f\u65b9\u3082\u3044\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u7b2c6\u56de\u3042\u305f\u308a\u3067\u5408\u6d41\u3057\u307e\u3059\u306e\u3067\uff0c\u5f15\u304d\u7d9a\u304d\u9811\u5f35\u3063\u3066\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n<p>\u3055\u3066\u6b21\u56de\u306f\uff0c\u300c\u30a2\u30cb\u30e1\u30fc\u30b7\u30e7\u30f3\u300d\u306e\u5b9f\u88c5\u306b\u3064\u3044\u3066\u3067\u3059\uff0e<\/p>\n<p><a href=\"https:\/\/hirlab.net\/nblog\/category\/programming\/art_1582\/\"><img loading=\"lazy\" class=\"aligncenter size-full wp-image-1583\" src=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/thum5.png\" alt=\"\u65e5\u672c\u8a9e\u7248SwiftUI\u30c1\u30e5\u30fc\u30c8\u30ea\u30a2\u30eb\" width=\"1200\" height=\"727\" srcset=\"https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/thum5.png 1200w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/thum5-300x182.png 300w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/thum5-768x465.png 768w, https:\/\/hirlab.net\/nblog\/wp-content\/uploads\/2020\/08\/thum5-1024x620.png 1024w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" \/><\/a><\/p>\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\u7b2c4\u56de\u76ee\u306f\u56f3\u5f62\u306e\u63cf\u753b\u306b\u3064\u3044\u3066\u5b66\u3093\u3067\u3044\u304d\u307e\u3057\u3087\u3046\uff01<\/p>\n","protected":false},"author":1,"featured_media":1578,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[83,81,82],"_links":{"self":[{"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/posts\/1526"}],"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=1526"}],"version-history":[{"count":29,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/posts\/1526\/revisions"}],"predecessor-version":[{"id":1751,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/posts\/1526\/revisions\/1751"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/media\/1578"}],"wp:attachment":[{"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/media?parent=1526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/categories?post=1526"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hirlab.net\/nblog\/wp-json\/wp\/v2\/tags?post=1526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}