{"id":619,"date":"2022-05-25T16:32:30","date_gmt":"2022-05-25T07:32:30","guid":{"rendered":"https:\/\/daymore.com\/?p=619"},"modified":"2022-05-25T17:54:57","modified_gmt":"2022-05-25T08:54:57","slug":"swift-metatype","status":"publish","type":"post","link":"https:\/\/blog.daymore.com\/?p=619","title":{"rendered":"Swift Metatype"},"content":{"rendered":"\n<p>The Swift Programming Language \ucc45\uc5d0\uc11c \uc815\uc758\ud55c \uba54\ud0c0\ud0c0\uc785<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"334\" src=\"https:\/\/daymore.com\/wp-content\/uploads\/2022\/05\/metatype-1024x334.png\" alt=\"\" class=\"wp-image-620\" srcset=\"https:\/\/blog.daymore.com\/wp-content\/uploads\/2022\/05\/metatype-1024x334.png 1024w, https:\/\/blog.daymore.com\/wp-content\/uploads\/2022\/05\/metatype-300x98.png 300w, https:\/\/blog.daymore.com\/wp-content\/uploads\/2022\/05\/metatype-768x251.png 768w, https:\/\/blog.daymore.com\/wp-content\/uploads\/2022\/05\/metatype-920x300.png 920w, https:\/\/blog.daymore.com\/wp-content\/uploads\/2022\/05\/metatype-230x75.png 230w, https:\/\/blog.daymore.com\/wp-content\/uploads\/2022\/05\/metatype-350x114.png 350w, https:\/\/blog.daymore.com\/wp-content\/uploads\/2022\/05\/metatype-480x157.png 480w, https:\/\/blog.daymore.com\/wp-content\/uploads\/2022\/05\/metatype.png 1404w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\ub0b4\uc6a9\uc744 \uc801\ub2f9\ud788 \uc694\uc57d\ud558\uba74 \uba54\ud0c0\ud0c0\uc785\uc740 \uc5b4\ub5a4 \ud0c0\uc785\uc758 \ud0c0\uc785\uc744 \ub098\ud0c0\ub0b4\uace0 \uba54\ud0c0\ud0c0\uc785 \uac12\uc740 T.self \ub610\ub294 type(of:) \ub85c \uc5bb\uc744 \uc218 \uc788\ub2e4.<br>\ub7f0\ud0c0\uc784\ub54c \uc778\uc2a4\ud134\uc2a4\uc758 \uba54\ud0c0\ud0c0\uc785 \uac12\uc744 \uc5bb\uc73c\ub824\uba74 type(of:)\ub97c \uc0ac\uc6a9\ud558\uba74 \ub41c\ub2e4. \uba54\ud0c0\ud0c0\uc785 \uac12\uc744 \uc5bb\uae30 \uc704\ud574 \uc0ac\uc6a9\ud558\ub294 .self \ub294 \ud074\ub798\uc2a4\ub97c \uc0dd\uc131\ud558\uba74 \uc790\ub3d9\uc73c\ub85c \uc0dd\uc131\ub418\ub294 self \ud504\ub85c\ud37c\ud2f0\uc640 \uc544\ubb34\ub7f0 \uc0c1\uad00\uc774 \uc5c6\ub2e4. \ud63c\ub3d9\ud558\uc9c0 \ub9d0\uc790.<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">let i: Int = 10<\/pre>\n\n\n\n<ul class=\"wp-block-list\"><li>i\ub294 Int\uc758 \uc778\uc2a4\ud134\uc2a4<\/li><li>Int\ub294 i\ub77c\ub294 \uc778\uc2a4\ud134\uc2a4\uc758 \ud0c0\uc785<\/li><li>Int.Type\uc740 Int\uc758 \uba54\ud0c0\ud0c0\uc785<\/li><\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">let j = Int                 \/\/build error, \ud0c0\uc785\uc740 \uac12\uc774 \ub420 \uc218 \uc5c6\uc74c\nlet k = Int.Type            \/\/build error, \uba54\ud0c0\ud0c0\uc785\uc740 \uac12\uc774 \ub420 \uc218 \uc5c6\uc74c\nlet l = Int.Type.self       \/\/Int\uc758 \uba54\ud0c0\ud0c0\uc785\uc758 \uba54\ud0c0\ud0c0\uc785 \uac12(Value)<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">print(\"\\(i.self)\")          \/\/10, \uc778\uc2a4\ud134\uc2a4\uc758 \uba54\ud0c0\ud0c0\uc785 \uac12\nprint(\"\\(Int)\")             \/\/build error, \ud0c0\uc785\uc740 \uac12\uc774 \ub420 \uc218 \uc5c6\uc74c\nprint(\"\\(Int.self)\")        \/\/Int, Int\uc758 \uba54\ud0c0\ud0c0\uc785 \uac12\nprint(\"\\(Int.Type)\")        \/\/build error, \uba54\ud0c0\ud0c0\uc785\uc740 \uac12\uc774 \ub420 \uc218 \uc5c6\uc74c\nprint(\"\\(Int.Type.self)\")   \/\/Int.Type, Int\uc758 \uba54\ud0c0\ud0c0\uc785\uc758 \uba54\ud0c0\ud0c0\uc785 \uac12<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">let a: Any = 10\nfn(a)\n\nfunc fn(_ a: Any) {\n    print(\"\\(type(of: a))\")    \/\/Int, a(Int\uc758 \uc778\uc2a4\ud134\uc2a4)\uc758 Dynamic(\ub7f0\ud0c0\uc784) \uba54\ud0c0\ud0c0\uc785 \uac12\n}<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">class Test {\n    static public var typeProperty = 0   \/\/\uc778\uc2a4\ud134\uc2a4 \uc5c6\uc774 \uc0ac\uc6a9, \uc804\uc5ed \ubcc0\uc218\uc640 \uac19\uc74c\n}\n\nvar t = Test()\n\/\/ Test\uc758 \uba54\ud0c0\ud0c0\uc785\uc740 Test.self, static(\ucef4\ud30c\uc77c\ud0c0\uc784)\n\/\/ t\uc758 \uba54\ud0c0\ud0c0\uc785\uc740 type(of: t), dynamic(\ub7f0\ud0c0\uc784)\n\nprint(Test.self.typeProperty)     \/\/0\n\/\/ Test \uba54\ud0c0\ud0c0\uc785 \uac12\uc758 \ud0c0\uc785 \ud504\ub85c\ud37c\ud2f0 \uc811\uadfc, Test.typeProperty\uc640 \uac19\uc74c<\/pre>\n\n\n\n<p><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Swift Programming Language \ucc45\uc5d0\uc11c \uc815\uc758\ud55c \uba54\ud0c0\ud0c0\uc785 \ub0b4\uc6a9\uc744 \uc801\ub2f9\ud788 \uc694\uc57d\ud558\uba74 \uba54\ud0c0\ud0c0\uc785\uc740 \uc5b4\ub5a4 \ud0c0\uc785\uc758 \ud0c0\uc785\uc744 \ub098\ud0c0\ub0b4\uace0 \uba54\ud0c0\ud0c0\uc785 \uac12\uc740 T.self \ub610\ub294 type(of:) \ub85c \uc5bb\uc744 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23],"tags":[191,194,190,17,28,193,192],"class_list":["post-619","post","type-post","status-publish","format-standard","hentry","category-swift","tag-self","tag-type-2","tag-metatype","tag-swift","tag-type","tag-typeof","tag-192"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Swift Metatype - \uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.daymore.com\/?p=619\" \/>\n<meta property=\"og:locale\" content=\"ko_KR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Swift Metatype - \uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd\" \/>\n<meta property=\"og:description\" content=\"The Swift Programming Language \ucc45\uc5d0\uc11c \uc815\uc758\ud55c \uba54\ud0c0\ud0c0\uc785 \ub0b4\uc6a9\uc744 \uc801\ub2f9\ud788 \uc694\uc57d\ud558\uba74 \uba54\ud0c0\ud0c0\uc785\uc740 \uc5b4\ub5a4 \ud0c0\uc785\uc758 \ud0c0\uc785\uc744 \ub098\ud0c0\ub0b4\uace0 \uba54\ud0c0\ud0c0\uc785 \uac12\uc740 T.self \ub610\ub294 type(of:) \ub85c \uc5bb\uc744 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blog.daymore.com\/?p=619\" \/>\n<meta property=\"og:site_name\" content=\"\uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd\" \/>\n<meta property=\"article:published_time\" content=\"2022-05-25T07:32:30+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-05-25T08:54:57+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/daymore.com\/wp-content\/uploads\/2022\/05\/metatype-1024x334.png\" \/>\n<meta name=\"author\" content=\"daymore\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\uae00\uc4f4\uc774\" \/>\n\t<meta name=\"twitter:data1\" content=\"daymore\" \/>\n\t<meta name=\"twitter:label2\" content=\"\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04\" \/>\n\t<meta name=\"twitter:data2\" content=\"2\ubd84\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.daymore.com\/?p=619\",\"url\":\"https:\/\/blog.daymore.com\/?p=619\",\"name\":\"Swift Metatype - \uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd\",\"isPartOf\":{\"@id\":\"https:\/\/blog.daymore.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/blog.daymore.com\/?p=619#primaryimage\"},\"image\":{\"@id\":\"https:\/\/blog.daymore.com\/?p=619#primaryimage\"},\"thumbnailUrl\":\"https:\/\/daymore.com\/wp-content\/uploads\/2022\/05\/metatype-1024x334.png\",\"datePublished\":\"2022-05-25T07:32:30+00:00\",\"dateModified\":\"2022-05-25T08:54:57+00:00\",\"author\":{\"@id\":\"https:\/\/blog.daymore.com\/#\/schema\/person\/d2a6b2e27e0ca7aa5736172b432c1763\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.daymore.com\/?p=619#breadcrumb\"},\"inLanguage\":\"ko-KR\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.daymore.com\/?p=619\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/blog.daymore.com\/?p=619#primaryimage\",\"url\":\"https:\/\/daymore.com\/wp-content\/uploads\/2022\/05\/metatype-1024x334.png\",\"contentUrl\":\"https:\/\/daymore.com\/wp-content\/uploads\/2022\/05\/metatype-1024x334.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.daymore.com\/?p=619#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.daymore.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Swift Metatype\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.daymore.com\/#website\",\"url\":\"https:\/\/blog.daymore.com\/\",\"name\":\"\uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd\",\"description\":\"blog.daymore.com\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.daymore.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"ko-KR\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.daymore.com\/#\/schema\/person\/d2a6b2e27e0ca7aa5736172b432c1763\",\"name\":\"daymore\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ko-KR\",\"@id\":\"https:\/\/blog.daymore.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/f7c8fbf7472c334702e25bab1089b35096ea0daf226ea3e22f66568aba3570e6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/f7c8fbf7472c334702e25bab1089b35096ea0daf226ea3e22f66568aba3570e6?s=96&d=mm&r=g\",\"caption\":\"daymore\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Swift Metatype - \uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd","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:\/\/blog.daymore.com\/?p=619","og_locale":"ko_KR","og_type":"article","og_title":"Swift Metatype - \uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd","og_description":"The Swift Programming Language \ucc45\uc5d0\uc11c \uc815\uc758\ud55c \uba54\ud0c0\ud0c0\uc785 \ub0b4\uc6a9\uc744 \uc801\ub2f9\ud788 \uc694\uc57d\ud558\uba74 \uba54\ud0c0\ud0c0\uc785\uc740 \uc5b4\ub5a4 \ud0c0\uc785\uc758 \ud0c0\uc785\uc744 \ub098\ud0c0\ub0b4\uace0 \uba54\ud0c0\ud0c0\uc785 \uac12\uc740 T.self \ub610\ub294 type(of:) \ub85c \uc5bb\uc744 [&hellip;]","og_url":"https:\/\/blog.daymore.com\/?p=619","og_site_name":"\uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd","article_published_time":"2022-05-25T07:32:30+00:00","article_modified_time":"2022-05-25T08:54:57+00:00","og_image":[{"url":"https:\/\/daymore.com\/wp-content\/uploads\/2022\/05\/metatype-1024x334.png","type":"","width":"","height":""}],"author":"daymore","twitter_card":"summary_large_image","twitter_misc":{"\uae00\uc4f4\uc774":"daymore","\uc608\uc0c1 \ub418\ub294 \ud310\ub3c5 \uc2dc\uac04":"2\ubd84"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.daymore.com\/?p=619","url":"https:\/\/blog.daymore.com\/?p=619","name":"Swift Metatype - \uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd","isPartOf":{"@id":"https:\/\/blog.daymore.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blog.daymore.com\/?p=619#primaryimage"},"image":{"@id":"https:\/\/blog.daymore.com\/?p=619#primaryimage"},"thumbnailUrl":"https:\/\/daymore.com\/wp-content\/uploads\/2022\/05\/metatype-1024x334.png","datePublished":"2022-05-25T07:32:30+00:00","dateModified":"2022-05-25T08:54:57+00:00","author":{"@id":"https:\/\/blog.daymore.com\/#\/schema\/person\/d2a6b2e27e0ca7aa5736172b432c1763"},"breadcrumb":{"@id":"https:\/\/blog.daymore.com\/?p=619#breadcrumb"},"inLanguage":"ko-KR","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.daymore.com\/?p=619"]}]},{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/blog.daymore.com\/?p=619#primaryimage","url":"https:\/\/daymore.com\/wp-content\/uploads\/2022\/05\/metatype-1024x334.png","contentUrl":"https:\/\/daymore.com\/wp-content\/uploads\/2022\/05\/metatype-1024x334.png"},{"@type":"BreadcrumbList","@id":"https:\/\/blog.daymore.com\/?p=619#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.daymore.com\/"},{"@type":"ListItem","position":2,"name":"Swift Metatype"}]},{"@type":"WebSite","@id":"https:\/\/blog.daymore.com\/#website","url":"https:\/\/blog.daymore.com\/","name":"\uae00\uc4f0\uae30, IT \uc791\uc740 \uc9c0\uc2dd","description":"blog.daymore.com","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.daymore.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"ko-KR"},{"@type":"Person","@id":"https:\/\/blog.daymore.com\/#\/schema\/person\/d2a6b2e27e0ca7aa5736172b432c1763","name":"daymore","image":{"@type":"ImageObject","inLanguage":"ko-KR","@id":"https:\/\/blog.daymore.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/f7c8fbf7472c334702e25bab1089b35096ea0daf226ea3e22f66568aba3570e6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/f7c8fbf7472c334702e25bab1089b35096ea0daf226ea3e22f66568aba3570e6?s=96&d=mm&r=g","caption":"daymore"}}]}},"_links":{"self":[{"href":"https:\/\/blog.daymore.com\/index.php?rest_route=\/wp\/v2\/posts\/619","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.daymore.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.daymore.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.daymore.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.daymore.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=619"}],"version-history":[{"count":13,"href":"https:\/\/blog.daymore.com\/index.php?rest_route=\/wp\/v2\/posts\/619\/revisions"}],"predecessor-version":[{"id":635,"href":"https:\/\/blog.daymore.com\/index.php?rest_route=\/wp\/v2\/posts\/619\/revisions\/635"}],"wp:attachment":[{"href":"https:\/\/blog.daymore.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=619"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.daymore.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=619"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.daymore.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=619"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}