{"provider_name":"Hatena Blog","author_name":"swiftlife","title":"Swift3\u3067\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304b\u3089\u578b\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3076","blog_title":"swift life","type":"rich","categories":["swift"],"width":"100%","url":"https://swiftlife.hatenablog.jp/entry/2017/02/14/221011","height":"190","blog_url":"https://swiftlife.hatenablog.jp/","provider_url":"https://hatena.blog","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fswiftlife.hatenablog.jp%2Fentry%2F2017%2F02%2F14%2F221011\" title=\"Swift3\u3067\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u304b\u3089\u578b\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3076 - swift life\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","version":"1.0","author_url":"https://blog.hatena.ne.jp/swiftlife/","published":"2017-02-14 22:10:11","description":"\u3042\u308b\u578b(class/struct)\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f7f\u3063\u3066\u578b\u30e1\u30bd\u30c3\u30c9\u3092\u547c\u3076\u306b\u306f\u3001type(of:)\u95a2\u6570\u3092\u4f7f\u3044\u307e\u3059\u3002 class Foo { static var bar: Int { return 100 } } let foo = Foo() foo.bar // error: static member 'bar' cannot be used on instance of type 'Foo' type(of: foo).bar // 100 \u4e0a\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc\u306b\u306a\u3063\u3066\u3044\u308b\u7b87\u6240\u306e\u3088\u3046\u306bfoo.bar\u3068\u306f\u547c\u3079\u306a\u3044\u306e\u3067\u6ce8\u610f\u3002\u3042\u3068\u3001Swift2\u3067\u4f7f\u3048\u3066\u3044\u305fdynamicType\u30d7\u30ed\u30d1\u30c6\u30a3\u306fSw\u2026","image_url":null}