{"id":34512,"date":"2021-08-01T08:07:19","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/www.sejuku.net\/blog\/?p=34512"},"modified":"2024-05-06T11:45:16","modified_gmt":"2024-05-06T02:45:16","slug":"%e3%80%90swift%e5%85%a5%e9%96%80%e3%80%91%e5%88%9d%e6%9c%9f%e5%8c%96%e5%87%a6%e7%90%86init%e3%81%ae%e4%bd%bf%e3%81%84%e6%96%b9%e3%82%92%e7%90%86%e8%a7%a3%e3%81%97%e3%82%88%e3%81%86%ef%bc%81","status":"publish","type":"post","link":"https:\/\/www.sejuku.net\/blog\/34512","title":{"rendered":"\u3010Swift\u5165\u9580\u3011\u521d\u671f\u5316\u51e6\u7406(init)\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01"},"content":{"rendered":"<p>Swift\u3067\u306f\u4ed6\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u8a00\u8a9e\u540c\u69d8\u30af\u30e9\u30b9\u306e<span style=\"color: #0000ff;\"><strong>\u521d\u671f\u5316\u51e6\u7406\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<br \/>\n<\/strong><\/span><br \/>\n\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001<\/p>\n<p><span style=\"color: #ff0000;\"><strong>\u30fbinit\u30e1\u30bd\u30c3\u30c9\u3068\u306f<br \/>\n\u30fbinit\u30e1\u30bd\u30c3\u30c9\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<br \/>\n\u30fbinit\u30e1\u30bd\u30c3\u30c9\u3067\u5f15\u6570\u3092\u6307\u5b9a\u3059\u308b\u65b9\u6cd5<\/strong><\/span><\/p>\n<p>\u3068\u3044\u3046\u30af\u30e9\u30b9\u306e\u57fa\u672c\u7684\u306a\u89e3\u8aac\u304b\u3089\u3001<\/p>\n<p><span style=\"color: #ff0000;\"><strong>\u30fbinit\u30e1\u30bd\u30c3\u30c9\u3092\u8907\u6570\u5b9a\u7fa9\u3059\u308b\u65b9\u6cd5<br \/>\n\u30fb\u69cb\u9020\u4f53\u3067init\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5<br \/>\n<\/strong><\/span><br \/>\n\u306a\u3069\u306e\u5fdc\u7528\u7684\u306a\u4f7f\u3044\u65b9\u306b\u95a2\u3057\u3066\u3082\u89e3\u8aac\u3057\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u306f\u305d\u3093\u306a<span style=\"color: #ff0000; background-color: #ffff99;\"><strong>\u521d\u671f\u5316\u51e6\u7406\uff08init\uff09\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u308f\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3057\u307e\u3059\uff01<\/strong><\/span><\/p>\n<p>\u203b\u3053\u306e\u8a18\u4e8b\u3067\u306fSwift3.1\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<h2>init\u30e1\u30bd\u30c3\u30c9\u3068\u306f<\/h2>\n<p><span style=\"color: #339966;\"><strong>init<\/strong><\/span>\u30e1\u30bd\u30c3\u30c9\u3068\u306f\u3001\u30af\u30e9\u30b9\u306e<span style=\"color: #ff0000;\"><strong>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\u3059\u308b\u3068\u304d\u306b\u81ea\u52d5\u3067\u547c\u3073\u51fa\u3055\u308c\u308b\u30e1\u30bd\u30c3\u30c9<\/strong><\/span>\u306e\u3053\u3068\u3067\u30a4\u30cb\u30b7\u30e3\u30e9\u30a4\u30b6\u3068\u3082\u547c\u3073\u307e\u3059\u3002<\/p>\n<p>init\u30e1\u30bd\u30c3\u30c9\u306f\u4e3b\u306b<span style=\"color: #0000ff;\"><strong>\u30af\u30e9\u30b9\u306e\u30d7\u30ed\u30d0\u30c6\u30a3\u306e\u521d\u671f\u5024\u3092\u8a2d\u5b9a<\/strong><\/span>\u3059\u308b\u3068\u304d\u306b\u4f7f\u7528\u3057\u307e\u3059\u3002<\/p>\n<p>\u30a4\u30cb\u30b7\u30e3\u30e9\u30a4\u30b6\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3067\u30af\u30e9\u30b9\u306e\u8a18\u8ff0\u5185\u5bb9\u304c\u3088\u308a\u5206\u304b\u308a\u3084\u3059\u304f\u306a\u308a\u3001<span style=\"color: #0000ff;\"><strong>\u660e\u78ba\u306b\u521d\u671f\u5316\u3092\u884c\u3044\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306e\u5b89\u5168\u6027\u3092\u9ad8\u3081\u308b<\/strong><\/span>\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u306a\u304a\u3001\u30af\u30e9\u30b9\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\uff01<br \/>\n            <a href=\"https:\/\/www.sejuku.net\/blog\/34191\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/image24-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010Swift\u5165\u9580\u3011\u30af\u30e9\u30b9(class)\u306e\u4f7f\u3044\u65b9\u3092\u308f\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\uff01<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            <\/p>\n<h2>\u30af\u30e9\u30b9\u3092init\u30e1\u30bd\u30c3\u30c9\u3067\u521d\u671f\u5316\u3059\u308b<\/h2>\n<p>\u3053\u3053\u3067\u306f<span style=\"color: #339966;\"><strong>init<\/strong><\/span>\u30e1\u30bd\u30c3\u30c9\u306e\u4f7f\u3044\u65b9\u3092\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002<\/p>\n<h3>\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<\/h3>\n<p>\u4ee5\u4e0b\u306binit\u30e1\u30bd\u30c3\u30c9\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p><strong>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0<\/strong><\/p>\n<pre class=\"lang:swift decode:true \">\/\/\u30af\u30e9\u30b9\u3092\u5b9a\u7fa9\r\nclass SampleClass {\r\n \r\n    \/\/\u5909\u6570\u306e\u5b9a\u7fa9\r\n    var str1 = \"\"\r\n    var str2 = \"\"\r\n    \r\n    \/\/\u30a4\u30cb\u30b7\u30e3\u30e9\u30a4\u30b6\r\n    init(){\r\n        self.str1 = \"Samurai\"\r\n        self.str2 = \"Engineer\"\r\n    }\r\n    \r\n}\r\n \r\n\/\/\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\r\nlet cl = SampleClass()\r\n \r\n\/\/\u30af\u30e9\u30b9\u306e\u5909\u6570\u3092\u53c2\u7167\r\nprint(cl.str1)\r\nprint(cl.str2)<\/pre>\n<p><strong>\u5b9f\u884c\u7d50\u679c\uff1a<\/strong><\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">Samurai\r\nEngineer<\/pre>\n<p>\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u306f\u30af\u30e9\u30b9SampleClass\u306e\u4e2d\u3067\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u5ba3\u8a00\u3068\u3001<span style=\"color: #0000ff;\"><strong>init\u30e1\u30bd\u30c3\u30c9\u306e\u4e2d\u3067\u30d7\u30ed\u30d1\u30c6\u30a3\u306e\u521d\u671f\u5316<\/strong><\/span>\u3092\u884c\u3063\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u51e6\u7406\u306e\u6d41\u308c\u3068\u3057\u3066\u306f\u3001\u30af\u30e9\u30b9\u306e\u5916\u3067<span style=\"color: #ff0000;\"><strong>\u30af\u30e9\u30b9\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\u6642\u306b\u81ea\u52d5\u3067init\u30e1\u30bd\u30c3\u30c9\u304c\u547c\u3073\u51fa\u3055\u308c\u307e\u3059\u3002<\/strong><\/span><\/p>\n<p>\u305d\u3057\u3066\u3001\u30af\u30e9\u30b9\u3067\u5ba3\u8a00\u3057\u3066\u3044\u308b2\u3064\u306e\u5909\u6570\u306b\u5bfe\u3057\u3066\u3001\u521d\u671f\u5024\u3092\u8a2d\u5b9a\u3057\u307e\u3059\u3002<\/p>\n<p>init\u30e1\u30bd\u30c3\u30c9\u3067\u8a2d\u5b9a\u3057\u305f\u5024\u306f\u30af\u30e9\u30b9\u306e\u5916\u304b\u3089<span style=\"color: #339966;\"><strong>\u300c\u30af\u30e9\u30b9\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8.\u30d7\u30ed\u30d1\u30c6\u30a3\u540d\u300d<\/strong><\/span>\u3092\u6307\u5b9a\u3057\u3066\u53c2\u7167\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/p>\n<h3>\u5f15\u6570\u3092\u6307\u5b9a\u3059\u308b\u65b9\u6cd5<\/h3>\n<p>init\u30e1\u30bd\u30c3\u30c9\u306f\u5f15\u6570\u3092\u6307\u5b9a\u3057\u3066\u521d\u671f\u5316\u51e6\u7406\u3092\u884c\u3046\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p><strong>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e01<\/strong><\/p>\n<pre class=\"lang:swift decode:true \">\/\/\u30af\u30e9\u30b9\u3092\u5b9a\u7fa9\r\nclass SampleClass {\r\n \r\n    \/\/\u5909\u6570\u306e\u5b9a\u7fa9\r\n    var sumval: Int = 0\r\n    \r\n    \/\/\u30a4\u30cb\u30b7\u30e3\u30e9\u30a4\u30b6\r\n    init(num1:Int, num2:Int){\r\n        sumval = num1 + num2;\r\n    }\r\n    \r\n}\r\n \r\n\/\/\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\r\nlet cl = SampleClass(num1:5, num2:10)\r\n \r\n\/\/\u30af\u30e9\u30b9\u306e\u5909\u6570\u3092\u53c2\u7167\r\nprint(cl.sumval)<\/pre>\n<p><strong>\u5b9f\u884c\u7d50\u679c\uff1a<\/strong><\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">15<\/pre>\n<p>\u3053\u306e\u30b5\u30f3\u30d7\u30eb\u3067\u306fnum1\u3001num2\u306e2\u3064\u306e\u5909\u6570\u3092<span style=\"color: #0000ff;\"><strong>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u306e\u521d\u671f\u5316\u6642\u306b\u5fc5\u8981\u306a\u30d1\u30e9\u30e1\u30fc\u30bf<\/strong><\/span>\u3068\u3057\u3066\u8a2d\u5b9a\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u305d\u306e\u305f\u3081\u3001\u30e1\u30bd\u30c3\u30c9\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u306b\u306f\u5f15\u6570\u3068\u3057\u3066num1\u3001num2\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u751f\u6210\u6642\u306e\u30af\u30e9\u30b9\u306e<span style=\"color: #ff0000;\"><strong>\u5f15\u6570\u306b\u5024\u3060\u3051\u6307\u5b9a\u3059\u308b\u3068\u30a8\u30e9\u30fc<\/strong><\/span>\u306b\u306a\u308a\u307e\u3059\u306e\u3067\u6ce8\u610f\u3057\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><strong>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e02<\/strong><\/p>\n<pre class=\"lang:swift decode:true \">\/\/\u30af\u30e9\u30b9\u3092\u5b9a\u7fa9\r\nclass SampleClass {\r\n \r\n    \/\/\u5909\u6570\u306e\u5b9a\u7fa9\r\n    var sumval: Int = 0\r\n    \r\n    \/\/\u30a4\u30cb\u30b7\u30e3\u30e9\u30a4\u30b6\r\n    init(num1:Int, num2:Int){\r\n        sumval = num1 + num2;\r\n    }\r\n    \r\n}\r\n \r\n\/\/\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\r\nlet cl = SampleClass(5, 10) \/\/\u30a8\u30e9\u30fc\r\n<\/pre>\n<h3>\u8907\u6570\u5b9a\u7fa9\u3059\u308b\u65b9\u6cd5<\/h3>\n<p>init\u30e1\u30bd\u30c3\u30c9\u306f<span style=\"color: #0000ff;\"><strong>\u76ee\u7684\u5225\u306b\u8907\u6570\u5b9a\u7fa9<\/strong><\/span>\u3059\u308b\u3053\u3068\u3082\u3067\u304d\u307e\u3059\u3002<\/p>\n<p>\u4ee5\u4e0b\u306bInt\u578b\u306e\u5024\u3092\u521d\u671f\u8a2d\u5b9a\u3059\u308binit\u30e1\u30bd\u30c3\u30c9\u3068\u3001String\u578b\u306e\u5024\u3092\u521d\u671f\u8a2d\u5b9a\u3059\u308binit\u30e1\u30bd\u30c3\u30c9\u3092\u5b9a\u7fa9\u3059\u308b\u30b5\u30f3\u30d7\u30eb\u3092\u7d39\u4ecb\u3057\u307e\u3059\u3002<\/p>\n<p><strong>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0<\/strong><\/p>\n<pre class=\"lang:swift decode:true \">class SampleClass {\r\n \r\n    \/\/\u5909\u6570\u306e\u5b9a\u7fa9\r\n    var sumval: Int = 0\r\n    var str: String = \"\"\r\n    \r\n    \/\/\u30a4\u30cb\u30b7\u30e3\u30e9\u30a4\u30b6\r\n    init(num1:Int, num2:Int){\r\n        sumval = num1 + num2;\r\n    }\r\n    \r\n    \/\/\u30a4\u30cb\u30b7\u30e3\u30e9\u30a4\u30b6\r\n    init(str1:String, str2:String){\r\n        str = str1 + str2;\r\n    }\r\n    \r\n}\r\n \r\n\/\/\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\r\nlet cl_1 = SampleClass(num1:5, num2:10)\r\nlet cl_2 = SampleClass(str1:\"Samurai\", str2:\"Engineer\")\r\n \r\n\/\/\u30af\u30e9\u30b9\u306e\u5909\u6570\u3092\u53c2\u7167\r\nprint(cl_1.sumval)\r\nprint(cl_2.str)<\/pre>\n<p><strong>\u5b9f\u884c\u7d50\u679c\uff1a<\/strong><\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">15\r\nSamuraiEngineer<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u8907\u6570\u306einit\u30e1\u30bd\u30c3\u30c9\u3092\u5b9a\u7fa9\u3067\u304d\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u306d\uff01<\/p>\n<p>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u751f\u6210\u6642\u306f\u305d\u308c\u305e\u308c<span style=\"color: #ff0000;\"><strong>init\u30e1\u30bd\u30c3\u30c9\u3067\u5b9a\u7fa9\u3057\u305f\u5f15\u6570\u3068\u4e00\u81f4\u3059\u308b\u578b\u3068\u5024\u3092\u6307\u5b9a\u3059\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059<\/strong><\/span>\u306e\u3067\u6c17\u3092\u3064\u3051\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h2>\u69cb\u9020\u4f53\u3092init\u30e1\u30bd\u30c3\u30c9\u3067\u521d\u671f\u5316\u3059\u308b<\/h2>\n<p>init\u30e1\u30bd\u30c3\u30c9\u306b\u3088\u308b\u521d\u671f\u5316\u51e6\u7406\u306f\u30af\u30e9\u30b9\u4ee5\u5916\u306b\u3082<span style=\"color: #0000ff;\"><strong>\u69cb\u9020\u4f53\u3067\u4f7f\u7528\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002<\/strong><\/span><\/p>\n<p><strong>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0<\/strong><\/p>\n<pre class=\"lang:swift decode:true \">struct SampleStruct {\r\n\r\n  let sumval: Int\r\n  \r\n  \/\/\u30a4\u30cb\u30b7\u30e3\u30e9\u30a4\u30b6\r\n  init(num1:Int, num2:Int){\r\n      self.sumval = num1 + num2\r\n  }\r\n}\r\n\r\n\/\/\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u751f\u6210\r\nlet st = SampleStruct(num1:10, num2:20)\r\nprint(st.sumval)<\/pre>\n<p><strong>\u5b9f\u884c\u7d50\u679c\uff1a<\/strong><\/p>\n<pre class=\"striped:false marking:false ranges:false nums:false nums-toggle:false lang:default decode:true \">30<\/pre>\n<p>\u3053\u306e\u3088\u3046\u306b\u69cb\u9020\u4f53\u3082init\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3057\u3066\u521d\u671f\u5316\u51e6\u7406\u304c\u884c\u3048\u308b\u3053\u3068\u304c\u308f\u304b\u308a\u307e\u3059\u306d\uff01<\/p>\n<p>\u306a\u304a\u3001\u69cb\u9020\u4f53\u306b\u3064\u3044\u3066\u306f\u4ee5\u4e0b\u306e\u8a18\u4e8b\u3067\u8a73\u3057\u304f\u89e3\u8aac\u3057\u3066\u3044\u307e\u3059\u306e\u3067\u305c\u3072\u53c2\u8003\u306b\u3057\u3066\u304f\u3060\u3055\u3044\u306d\uff01<br \/>\n            <a href=\"https:\/\/www.sejuku.net\/blog\/32783\" class=\"blog-card-anchor\">\n                <div class=\"blog-card\">\n                <div class=\"blog-card-content\">\n                    <div class=\"blog-card-thumbnail\">\n                    <img decoding=\"async\" class=\"blog-card-thumbnail-img\" src=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/image-14-150x86.jpg\">\n                    <\/div>\n                    <div class=\"blog-card-title-wrap\">\n                    <div class=\"blog-card-title\">\u3010Swift\u5165\u9580\u3011\u69cb\u9020\u4f53(struct)\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01<\/div>\n                    <div class=\"blog-card-update-date\">\u66f4\u65b0\u65e5\uff1a2024\u5e745\u67086\u65e5<\/div>\n                    <\/div>\n                <\/div>\n                <\/div>\n            <\/a>\n            <\/p>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u3053\u3053\u3067\u306fSwift\u306e\u521d\u671f\u5316\u51e6\u7406\u306b\u3064\u3044\u3066\u3001<\/p>\n<p><strong>\u30fbinit\u30e1\u30bd\u30c3\u30c9\u3068\u306f<br \/>\n\u30fbinit\u30e1\u30bd\u30c3\u30c9\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9<br \/>\n\u30fbinit\u30e1\u30bd\u30c3\u30c9\u3067\u5f15\u6570\u3092\u6307\u5b9a\u3059\u308b\u65b9\u6cd5<br \/>\n\u30fbinit\u30e1\u30bd\u30c3\u30c9\u3092\u8907\u6570\u5b9a\u7fa9\u3059\u308b\u65b9\u6cd5<br \/>\n\u30fb\u69cb\u9020\u4f53\u3067init\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u7528\u3059\u308b\u65b9\u6cd5<\/strong><\/p>\n<p>\u306a\u3069\u306b\u3064\u3044\u3066\u89e3\u8aac\u3057\u307e\u3057\u305f\u3002<\/p>\n<p><span style=\"color: #ff0000;\"><strong>\u30af\u30e9\u30b9\u3084\u69cb\u9020\u4f53\u3067init\u30e1\u30bd\u30c3\u30c9\u3092\u4f7f\u3046\u3053\u3068\u306b\u3088\u308a\u3001\u521d\u671f\u5316\u51e6\u7406\u3092\u660e\u78ba\u306b\u8a18\u8ff0\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u306e\u3067\u7a4d\u6975\u7684\u306b\u6d3b\u7528\u3059\u308b\u3088\u3046\u306b\u3057\u307e\u3057\u3087\u3046\u3002<\/strong><\/span><\/p>\n<p>\u3082\u3057init\u30e1\u30bd\u30c3\u30c9\u306e\u4f7f\u3044\u65b9\u3092\u5fd8\u308c\u3066\u3057\u307e\u3063\u305f\u3089\u3001\u3053\u306e\u8a18\u4e8b\u3092\u601d\u3044\u51fa\u3057\u3066\u304f\u3060\u3055\u3044\u306d\uff01<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Swift\u3067\u306f\u4ed6\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u6307\u5411\u8a00\u8a9e\u540c\u69d8\u30af\u30e9\u30b9\u306e\u521d\u671f\u5316\u51e6\u7406\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u307e\u3059\u3002 \u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001 \u30fbinit\u30e1\u30bd\u30c3\u30c9\u3068\u306f \u30fbinit\u30e1\u30bd\u30c3\u30c9\u306e\u57fa\u672c\u7684\u306a\u4f7f\u3044\u65b9 \u30fbinit\u30e1\u30bd\u30c3\u30c9\u3067\u5f15\u6570\u3092\u6307\u5b9a\u3059\u308b\u65b9\u6cd5 \u3068\u3044\u3046\u30af\u30e9\u30b9\u306e\u57fa\u672c\u7684 [&hellip;]<\/p>\n","protected":false},"author":16433,"featured_media":34515,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"swell_btn_cv_data":"","footnotes":""},"categories":[10],"tags":[685],"class_list":["post-34512","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-swift","tag-swift"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u3010Swift\u5165\u9580\u3011\u521d\u671f\u5316\u51e6\u7406(init)\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0<\/title>\n<meta name=\"description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Swift\u5165\u9580\u3011\u521d\u671f\u5316\u51e6\u7406(init)\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.sejuku.net\/blog\/34512\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u3010Swift\u5165\u9580\u3011\u521d\u671f\u5316\u51e6\u7406(init)\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"og:description\" content=\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Swift\u5165\u9580\u3011\u521d\u671f\u5316\u51e6\u7406(init)\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.sejuku.net\/blog\/34512\" \/>\n<meta property=\"og:site_name\" content=\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/sejuku2013\" \/>\n<meta property=\"article:published_time\" content=\"1970-01-01T00:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-05-06T02:45:16+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/image-27.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"700\" \/>\n\t<meta property=\"og:image:height\" content=\"400\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@samuraijuku\" \/>\n<meta name=\"twitter:site\" content=\"@samuraijuku\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/34512#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/34512\"},\"author\":{\"name\":\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/d20c57b59dba15001519a8a671183095\"},\"headline\":\"\u3010Swift\u5165\u9580\u3011\u521d\u671f\u5316\u51e6\u7406(init)\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01\",\"datePublished\":\"1970-01-01T00:00:00+00:00\",\"dateModified\":\"2024-05-06T02:45:16+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/34512\"},\"wordCount\":59,\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/34512#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/image-27.jpg\",\"keywords\":[\"Swift\"],\"articleSection\":[\"Swift\"],\"inLanguage\":\"ja\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/34512\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/34512\",\"name\":\"\u3010Swift\u5165\u9580\u3011\u521d\u671f\u5316\u51e6\u7406(init)\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/34512#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/34512#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/image-27.jpg\",\"datePublished\":\"1970-01-01T00:00:00+00:00\",\"dateModified\":\"2024-05-06T02:45:16+00:00\",\"description\":\"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Swift\u5165\u9580\u3011\u521d\u671f\u5316\u51e6\u7406(init)\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/34512#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/34512\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/34512#primaryimage\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/image-27.jpg\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2017\\\/09\\\/image-27.jpg\",\"width\":700,\"height\":400},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/34512#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u3010Swift\u5165\u9580\u3011\u521d\u671f\u5316\u51e6\u7406(init)\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"name\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0\",\"description\":\"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#organization\",\"name\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"contentUrl\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/wp-content\\\/uploads\\\/2023\\\/07\\\/logo.png\",\"width\":600,\"height\":600,\"caption\":\"\u682a\u5f0f\u4f1a\u793eSAMURAI\"},\"image\":{\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/sejuku2013\",\"https:\\\/\\\/x.com\\\/samuraijuku\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCCFOQO5aDK0xXam4cUQXT8g\\\/featured\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/#\\\/schema\\\/person\\\/d20c57b59dba15001519a8a671183095\",\"name\":\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g\",\"caption\":\"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\"},\"description\":\"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u587e\u306f\u300c\u4eba\u751f\u3092\u5909\u3048\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u300d\u3092\u30b3\u30f3\u30bb\u30f3\u30d7\u30c8\u306b\u3001\u904e\u53bb\u591a\u304f\u306e\u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u8f29\u51fa\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3067\u3059\u3002\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\u3067\u306f\u6280\u8853\u7cfb\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4e2d\u5fc3\u306b\u6709\u7528\u306a\u60c5\u5831\u3092\u767a\u4fe1\u3057\u3066\u3044\u304d\u307e\u3059\u3002\",\"url\":\"https:\\\/\\\/www.sejuku.net\\\/blog\\\/author\\\/samurai-tech\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u3010Swift\u5165\u9580\u3011\u521d\u671f\u5316\u51e6\u7406(init)\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Swift\u5165\u9580\u3011\u521d\u671f\u5316\u51e6\u7406(init)\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.sejuku.net\/blog\/34512","og_locale":"ja_JP","og_type":"article","og_title":"\u3010Swift\u5165\u9580\u3011\u521d\u671f\u5316\u51e6\u7406(init)\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","og_description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Swift\u5165\u9580\u3011\u521d\u671f\u5316\u51e6\u7406(init)\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","og_url":"https:\/\/www.sejuku.net\/blog\/34512","og_site_name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","article_publisher":"https:\/\/www.facebook.com\/sejuku2013","article_published_time":"1970-01-01T00:00:00+00:00","article_modified_time":"2024-05-06T02:45:16+00:00","og_image":[{"width":700,"height":400,"url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/image-27.jpg","type":"image\/jpeg"}],"author":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8","twitter_card":"summary_large_image","twitter_creator":"@samuraijuku","twitter_site":"@samuraijuku","schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.sejuku.net\/blog\/34512#article","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/34512"},"author":{"name":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/d20c57b59dba15001519a8a671183095"},"headline":"\u3010Swift\u5165\u9580\u3011\u521d\u671f\u5316\u51e6\u7406(init)\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01","datePublished":"1970-01-01T00:00:00+00:00","dateModified":"2024-05-06T02:45:16+00:00","mainEntityOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/34512"},"wordCount":59,"publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/34512#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/image-27.jpg","keywords":["Swift"],"articleSection":["Swift"],"inLanguage":"ja"},{"@type":"WebPage","@id":"https:\/\/www.sejuku.net\/blog\/34512","url":"https:\/\/www.sejuku.net\/blog\/34512","name":"\u3010Swift\u5165\u9580\u3011\u521d\u671f\u5316\u51e6\u7406(init)\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01 | \u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","isPartOf":{"@id":"https:\/\/www.sejuku.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.sejuku.net\/blog\/34512#primaryimage"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/34512#primaryimage"},"thumbnailUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/image-27.jpg","datePublished":"1970-01-01T00:00:00+00:00","dateModified":"2024-05-06T02:45:16+00:00","description":"\u3053\u306e\u8a18\u4e8b\u3067\u306f\u300c \u3010Swift\u5165\u9580\u3011\u521d\u671f\u5316\u51e6\u7406(init)\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01 \u300d\u306b\u3064\u3044\u3066\u3001\u8ab0\u3067\u3082\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u89e3\u8aac\u3057\u307e\u3059\u3002\u3053\u306e\u8a18\u4e8b\u3092\u8aad\u3081\u3070\u3001\u3042\u306a\u305f\u306e\u60a9\u307f\u304c\u89e3\u6c7a\u3059\u308b\u3060\u3051\u3058\u3083\u306a\u304f\u3001\u65b0\u305f\u306a\u6c17\u4ed8\u304d\u3082\u767a\u898b\u3067\u304d\u308b\u3053\u3068\u3067\u3057\u3087\u3046\u3002\u304a\u60a9\u307f\u306e\u65b9\u306f\u305c\u3072\u3054\u4e00\u8aad\u304f\u3060\u3055\u3044\u3002","breadcrumb":{"@id":"https:\/\/www.sejuku.net\/blog\/34512#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.sejuku.net\/blog\/34512"]}]},{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/34512#primaryimage","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/image-27.jpg","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2017\/09\/image-27.jpg","width":700,"height":400},{"@type":"BreadcrumbList","@id":"https:\/\/www.sejuku.net\/blog\/34512#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.sejuku.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u3010Swift\u5165\u9580\u3011\u521d\u671f\u5316\u51e6\u7406(init)\u306e\u4f7f\u3044\u65b9\u3092\u7406\u89e3\u3057\u3088\u3046\uff01"}]},{"@type":"WebSite","@id":"https:\/\/www.sejuku.net\/blog\/#website","url":"https:\/\/www.sejuku.net\/blog\/","name":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u30d6\u30ed\u30b0","description":"\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u306e\u3059\u3079\u3066\u304c\u30b3\u30b3\u306b\u3002","publisher":{"@id":"https:\/\/www.sejuku.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.sejuku.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.sejuku.net\/blog\/#organization","name":"\u682a\u5f0f\u4f1a\u793eSAMURAI","url":"https:\/\/www.sejuku.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","contentUrl":"https:\/\/www.sejuku.net\/blog\/wp-content\/uploads\/2023\/07\/logo.png","width":600,"height":600,"caption":"\u682a\u5f0f\u4f1a\u793eSAMURAI"},"image":{"@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/sejuku2013","https:\/\/x.com\/samuraijuku","https:\/\/www.youtube.com\/channel\/UCCFOQO5aDK0xXam4cUQXT8g\/featured"]},{"@type":"Person","@id":"https:\/\/www.sejuku.net\/blog\/#\/schema\/person\/d20c57b59dba15001519a8a671183095","name":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/secure.gravatar.com\/avatar\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d91ed20aaa7f873a0f4f35586561303460c1e3864746dddb6ebe0fb093c1952d?s=96&d=mm&r=g","caption":"\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8"},"description":"\u4f8d\u30a8\u30f3\u30b8\u30cb\u30a2\u587e\u306f\u300c\u4eba\u751f\u3092\u5909\u3048\u308b\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u5b66\u7fd2\u300d\u3092\u30b3\u30f3\u30bb\u30f3\u30d7\u30c8\u306b\u3001\u904e\u53bb\u591a\u304f\u306e\u30d5\u30ea\u30fc\u30e9\u30f3\u30b9\u30a8\u30f3\u30b8\u30cb\u30a2\u3092\u8f29\u51fa\u3057\u305f\u30d7\u30ed\u30b0\u30e9\u30df\u30f3\u30b0\u30b9\u30af\u30fc\u30eb\u3067\u3059\u3002\u4f8d\u30c6\u30c3\u30af\u7de8\u96c6\u90e8\u3067\u306f\u6280\u8853\u7cfb\u30b3\u30f3\u30c6\u30f3\u30c4\u3092\u4e2d\u5fc3\u306b\u6709\u7528\u306a\u60c5\u5831\u3092\u767a\u4fe1\u3057\u3066\u3044\u304d\u307e\u3059\u3002","url":"https:\/\/www.sejuku.net\/blog\/author\/samurai-tech"}]}},"_links":{"self":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/34512","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/users\/16433"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/comments?post=34512"}],"version-history":[{"count":0,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/posts\/34512\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media\/34515"}],"wp:attachment":[{"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/media?parent=34512"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/categories?post=34512"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sejuku.net\/blog\/wp-json\/wp\/v2\/tags?post=34512"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}