{"id":300,"date":"2021-04-20T11:59:51","date_gmt":"2021-04-20T02:59:51","guid":{"rendered":"http:\/\/practical.kr\/?p=300"},"modified":"2021-04-20T14:32:47","modified_gmt":"2021-04-20T05:32:47","slug":"swiftui-tabar-navigationview-%ed%83%ad%eb%b0%94-%eb%84%a4%eb%b9%84%ea%b2%8c%ec%9d%b4%ec%85%98%eb%b7%b0","status":"publish","type":"post","link":"http:\/\/practical.kr\/?p=300","title":{"rendered":"SwiftUI Tabar\/NavigationView (\ud0ed\ubc14\/\ub124\ube44\uac8c\uc774\uc158\ubdf0)"},"content":{"rendered":"\n<p>\ucd5c\uadfc Flutter\uac00 \uc880 \uc9c0\ub8e8\ud574\uc838\uc11c &#8211; \uc9c0\ub8e8\ud574\uc9c4 \uc774\uc720\ub294 \ub2e4\uc74c\uc5d0 \uc4f0\uae30\ub85c \ud558\uace0 &#8211; iOS \ub124\uc774\ud2f0\ube0c \uac1c\ubc1c\uc744 \ub2e4\uc2dc \ud574\ubcf4\uace0 \uc2f6\ub2e4\ub294 \ucda9\ub3d9(?)\uc5d0 SwiftUI \uc2a4\ud130\ub514\ub97c \uc2dc\uc791\ud588\ub2e4. iOS \uac1c\ubc1c\uc740 Obj-C \ubd80\ud130 \uac70\uc758 10\uc5ec\ub144\uc744 \ud558\uace0 \uc788\uc9c0\ub9cc \uc544\uc9c1 SwiftUI\ub97c \uc368\ubcf4\uc9c0 \ubabb\ud574\uc11c \uc544\ub798 \ub9c1\ud06c\uc758 \ud29c\ud1a0\ub9ac\uc5bc\uc744 \ub530\ub77c\ud574\ubcf4\uace0 \ub300\ub7b5\uc758 \uac10\uc744 \uc7a1\uc744 \uc218 \uc788\uc5c8\ub2e4.<\/p>\n\n\n\n<p>\uc544\ub798 \ub9c1\ud06c\ub97c \ub530\ub77c\uac00\uba74 SwiftUI\uc758 \uae30\ubcf8\uc801\uc778 Interface\uc5d0 \ub300\ud55c \uc774\ud574\ub97c \uc5bb\uc744 \uc218 \uc788\ub2e4.<\/p>\n\n\n\n<p><a href=\"https:\/\/developer.apple.com\/tutorials\/swiftui\/creating-and-combining-views\" data-type=\"URL\" data-id=\"https:\/\/developer.apple.com\/tutorials\/swiftui\/creating-and-combining-views\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/developer.apple.com\/tutorials\/swiftui\/creating-and-combining-views <\/a><\/p>\n\n\n\n<p>\uac01\uc124\ud558\uace0&#8230; \uc544\ub798 \ucf54\ub4dc\ub294 iOS\uc758 \ub300\ud45c\uc801\uc778 UI\uc778 \ud0ed\ubc14\ub124\ube44\uac8c\uc774\uc158 \uc148\ud50c\ucf54\ub4dc\uc774\ub2e4. Xib \ud30c\uc77c\ub3c4 \uc5c6\uace0 \ud3fc\ub514\uc790\uc774\ub108\ub3c4 \uc5c6\ub2e4.  \uc774\ub807\uac8c \uc2ec\ud50c\ud558\uac8c \ucf54\ub4dc\ub97c \ub9cc\ub4e4 \uc218 \uc788\ub294\ub370 \uadf8\ub3d9\uc548 \uc65c \uadf8\ub807\uac8c \ud588\ub294\uc9c0 \uc774\ud574 \ud560 \uc218 \uc5c6\uc9c0\ub9cc&#8230; \ub9e4\uc6b0 \ub9cc\uc871 \uc2a4\ub7fd\ub2e4. Group, VStack, HStack \ub4f1\uc744 \uc774\uc6a9\ud574\uc11c \ubdf0 \uc0c1\uc138\ub97c \uafb8\ubbf8\ub2e4\ubcf4\uba74 CSS\uc5d0\uc11c \ubcf8\uac83 \uac19\uae30\ub3c4 \ud558\uace0 Flutter \uc5d0\uc11c \ubcf8\uac83 \uac19\uae30\ub3c4\ud55c\ub370 \uac01\uc885UI \ud504\ub808\uc784\uc6cc\ud06c\uc758 \uc88b\uc740 \uc810\uc744 \uc798 \uac00\uc838\uc640\uc11c \ub9cc\ub4e4\uc5c8\ub2e4\ub294 \uc0dd\uac01\uc774 \ub4e4\uc5c8\ub2e4.<\/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=\"\">\/\/\n\/\/  ContentView.swift\n\/\/  study1\n\/\/\n\/\/  Created by Park Billy on 2021\/04\/20.\n\/\/\n\nimport SwiftUI\n\nstruct View1: View {\n    var body: some View {\n        \n        \/\/ \ub124\uc774\uac8c\uc774\uc158\ubdf0\ub85c \ub9cc\ub4e4\uc5b4 \uc918\uc57c BarTitle\uc744 \ub9cc\ub4e4\uba70 \uc0c1\uc138\ubdf0\ub85c \uc774\ub3d9 \ud560 \uc218 \uc788\ub2e4.\n        NavigationView {\n            \/\/ DetailView\ub85c \uc774\ub3d9\n            NavigationLink(destination: DetailView()){\n                Text(\"Go Detail View\")\n            }\n            .navigationBarTitle(\"\uccab\ubc88\uc9f8\ubdf0\")\n        }\n        .tabItem { \/\/ \ud0ed\ubc14 \ud0c0\uc774\ud2c0\uacfc \uc544\uc774\ucf58\n            Text(\"View1\")\n            Image(systemName: \"tray.full\")\n        }\n    }\n}\n\nstruct View2: View {\n    var body: some View {\n        NavigationView {\n            Text(\"Hello View2\")\n                .navigationBarTitle(\"\ub450\ubc88\uc9f8\ubdf0\")\n            \n        }\n        .tabItem {\n            Text(\"View2\")\n            Image(systemName: \"tray\")\n        }\n    }\n}\n\nstruct DetailView: View {\n    var body: some View {\n        Text(\"Hello Detail View\")\n            .navigationBarTitle(\"\uc0c1\uc138\ubdf0\")\n    }\n}\n\nstruct ContentView: View {\n    var body: some View {\n        \/\/ \ud0ed\ubc14\ub97c \ub9cc\ub4e0\ub2e4 ... \uc774\ub807\uac8c \uac04\ub2e8\ud788?\n        TabView {\n            View1()\n            View2()\n        }\n    }\n}\n<\/pre>\n\n\n\n<p>\uc544\ub798\ub294 \uc2e4\ud589 \uacb0\uacfc &#8211; \uccab\ubc88\uc9f8\ubdf0\uc5d0\uc11c [Go Detail View]\ub97c \ub204\ub974\uba74 \uc0c1\uc138\ubdf0\ub85c \uc774\ub3d9\ud55c\ub2e4. \uc0c1\uc138\ubdf0\ub294 \uc0c1\ub2e8\uc5d0 \ub124\ube44\uac8c\uc774\uc158 \ud0c0\uc774\ud2c0\uc774 \ubdf0 \uc2a4\ud06c\ub864\ub418\uba74 \uc790\ub3d9\uc73c\ub85c \uc0c1\ub2e8\uc73c\ub85c \ubd99\uc5b4\uc62c\ub77c\uac00\ub294 \uae30\ub2a5\uc774 \uc788\ub2e4. \uadf8\ub9ac\uace0 \ube4c\ub4dc\ud558\uc9c0 \uc54a\uc544\ub3c4 Xcode\uc5d0\uc11c \ud504\ub9ac\ubdf0\ub97c \ubcfc \uc218\ub3c4 \uc788\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\" style=\"flex-basis:100%\">\n<figure class=\"wp-block-gallery aligncenter columns-2 is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\"><ul class=\"blocks-gallery-grid\"><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"1284\" height=\"2778\" src=\"http:\/\/practical.kr\/wp-content\/uploads\/2021\/04\/Simulator-Screen-Shot-iPhone-12-Pro-Max-2021-04-20-at-11.36.55.png\" alt=\"\" data-id=\"312\" data-link=\"http:\/\/practical.kr\/?attachment_id=312\" class=\"wp-image-312\"\/><\/figure><\/li><li class=\"blocks-gallery-item\"><figure><img loading=\"lazy\" decoding=\"async\" width=\"1284\" height=\"2778\" src=\"http:\/\/practical.kr\/wp-content\/uploads\/2021\/04\/Simulator-Screen-Shot-iPhone-12-Pro-Max-2021-04-20-at-11.37.01.png\" alt=\"\" data-id=\"313\" data-link=\"http:\/\/practical.kr\/?attachment_id=313\" class=\"wp-image-313\"\/><\/figure><\/li><\/ul><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>\uc624\ub79c\ub9cc\uc5d0 \ub124\uc774\ud2f0\ube0c\ub85c \uc2a4\ud1a0\uc5b4\uc5d0 \uc571\uc744 \ud558\ub098 \uc62c\ub824\uc57c\uaca0\ub2e4\uace0 \uc0dd\uac01\ud588\ub2e4. <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ucd5c\uadfc Flutter\uac00 \uc880 \uc9c0\ub8e8\ud574\uc838\uc11c &#8211; \uc9c0\ub8e8\ud574\uc9c4 \uc774\uc720\ub294 \ub2e4\uc74c\uc5d0 \uc4f0\uae30\ub85c \ud558\uace0 &#8211; iOS \ub124\uc774\ud2f0\ube0c \uac1c\ubc1c\uc744 \ub2e4\uc2dc \ud574\ubcf4\uace0 \uc2f6\ub2e4\ub294 \ucda9\ub3d9(?)\uc5d0 SwiftUI \uc2a4\ud130\ub514\ub97c \uc2dc\uc791\ud588\ub2e4. iOS \uac1c\ubc1c\uc740 Obj-C \ubd80\ud130 \uac70\uc758 10\uc5ec\ub144\uc744 \ud558\uace0 \uc788\uc9c0\ub9cc \uc544\uc9c1 SwiftUI\ub97c \uc368\ubcf4\uc9c0 \ubabb\ud574\uc11c \uc544\ub798 \ub9c1\ud06c\uc758 \ud29c\ud1a0\ub9ac\uc5bc\uc744 \ub530\ub77c\ud574\ubcf4\uace0 \ub300\ub7b5\uc758 \uac10\uc744 \uc7a1\uc744 \uc218 \uc788\uc5c8\ub2e4. \uc544\ub798 \ub9c1\ud06c\ub97c \ub530\ub77c\uac00\uba74 SwiftUI\uc758 \uae30\ubcf8\uc801\uc778 Interface\uc5d0 \ub300\ud55c \uc774\ud574\ub97c \uc5bb\uc744 \uc218 \uc788\ub2e4. https:\/\/developer.apple.com\/tutorials\/swiftui\/creating-and-combining-views \uac01\uc124\ud558\uace0&#8230;<\/p>\n<div class=\"more-link\">\n\t\t\t\t <a href=\"http:\/\/practical.kr\/?p=300\" class=\"link-btn theme-btn\"><span>Read More <\/span> <i class=\"fa fa-caret-right\"><\/i><\/a>\n\t\t\t<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[14,13,26,27,40],"tags":[],"class_list":["post-300","post","type-post","status-publish","format-standard","hentry","category-app","category-ios","category-iphone","category-swift","category-swiftui"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"http:\/\/practical.kr\/index.php?rest_route=\/wp\/v2\/posts\/300","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/practical.kr\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/practical.kr\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/practical.kr\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/practical.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=300"}],"version-history":[{"count":9,"href":"http:\/\/practical.kr\/index.php?rest_route=\/wp\/v2\/posts\/300\/revisions"}],"predecessor-version":[{"id":315,"href":"http:\/\/practical.kr\/index.php?rest_route=\/wp\/v2\/posts\/300\/revisions\/315"}],"wp:attachment":[{"href":"http:\/\/practical.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=300"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/practical.kr\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=300"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/practical.kr\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=300"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}