{"id":275,"date":"2021-09-17T15:23:21","date_gmt":"1970-01-01T00:00:00","guid":{"rendered":"http:\/\/swift.tecc0.com\/?p=275"},"modified":"2021-09-17T15:23:21","modified_gmt":"1970-01-01T00:00:00","slug":"post-275","status":"publish","type":"post","link":"https:\/\/swift.tecc0.com\/?p=275","title":{"rendered":"Swift\u3067\u30af\u30e9\u30b9\u3092\u7d99\u627f\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"<p>Swift\u3067\u306f\u3001<strong>\u8907\u6570\u30af\u30e9\u30b9<\/strong>\u3092<strong>\u7d99\u627f<\/strong>\u3059\u308b(\u89aa\u30af\u30e9\u30b9\u306b\u6301\u3064\u3053\u3068)\u306f\u3067\u304d\u307e\u305b\u3093\u3002\u3064\u307e\u308a\u3001<strong>\u591a\u91cd\u7d99\u627f<\/strong>\u306f\u7981\u6b62\u3055\u308c\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>&nbsp;<\/p>\n<h3>Swift\u3067\u30af\u30e9\u30b9\u3092\u7d99\u627f\u3059\u308b<\/h3>\n<pre class=\"lang:swift decode:true\">class Human {\r\n    func sayHello() {\r\n        print(\"Hello!!\")\r\n    }\r\n}\r\n\r\n\/\/ Human\u30af\u30e9\u30b9\u3092\u7d99\u627f\r\nclass Man: Human {\r\n    \r\n    let sex = \"man\"\r\n    \r\n    func getSex () -&gt; String {\r\n        return self.sex\r\n    }\r\n    \r\n    func callSuper () {\r\n        \/\/ \u89aa\u30af\u30e9\u30b9\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3073\u51fa\u3059\r\n        super.sayHello()\r\n    }\r\n}\r\n\r\nlet man = Man()\r\n\r\nlet sex = man.getSex()\r\nprint(sex) \/\/ \"man\"\r\n\r\nman.sayHello() \/\/ \"Hello!!\" (\u89aa\u30af\u30e9\u30b9\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3076)\r\nman.callSuper() \/\/ \"Hello!!\"<\/pre>\n<p>\u3053\u3093\u306a\u611f\u3058\u3067\u7d99\u627f\u3067\u304d\u308b\u3088\u3002<\/p>\n<p>\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u5316\u3057\u305f\u3089\u3001\u89aa\u306e\u30e1\u30bd\u30c3\u30c9\u306f\u547c\u3079\u308b\u3057\u3001\u7d99\u627f\u5148\u306e\u30af\u30e9\u30b9\u304b\u3089\u306f <strong>super<\/strong> \u3092\u3064\u3051\u308c\u3070\u89aa\u30af\u30e9\u30b9\u306e\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3079\u308b\u3088\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Swift\u3067\u306f\u3001\u8907\u6570\u30af\u30e9\u30b9\u3092\u7d99\u627f\u3059\u308b(\u89aa\u30af\u30e9\u30b9\u306b\u6301\u3064\u3053\u3068)\u306f\u3067\u304d\u307e\u305b\u3093\u3002\u3064\u307e\u308a\u3001\u591a\u91cd\u7d99\u627f\u306f\u7981\u6b62\u3055\u308c\u3066\u3044\u307e\u3059\u3002 &nbsp; Swift\u3067\u30af\u30e9\u30b9\u3092\u7d99\u627f\u3059\u308b class Human { func sayHello() { p&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[17],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts\/275"}],"collection":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=275"}],"version-history":[{"count":1,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts\/275\/revisions"}],"predecessor-version":[{"id":276,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=\/wp\/v2\/posts\/275\/revisions\/276"}],"wp:attachment":[{"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=275"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=275"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/swift.tecc0.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=275"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}