From 2edd3bdc6e024ad4bbf19eab9aa9a00a2c268dbe Mon Sep 17 00:00:00 2001 From: sem-git Date: Thu, 5 Dec 2024 02:43:36 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20TabView=20=EC=8B=A4=EC=8A=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../LeeSeminSU.xcodeproj/project.pbxproj | 12 ++++++++ .../Week4/TabView/TabViewExample.swift | 28 +++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 LeeSeminSU/LeeSeminSU/Week4/TabView/TabViewExample.swift diff --git a/LeeSeminSU/LeeSeminSU.xcodeproj/project.pbxproj b/LeeSeminSU/LeeSeminSU.xcodeproj/project.pbxproj index de128b6..d13a036 100644 --- a/LeeSeminSU/LeeSeminSU.xcodeproj/project.pbxproj +++ b/LeeSeminSU/LeeSeminSU.xcodeproj/project.pbxproj @@ -24,6 +24,7 @@ 76FC2B7D2D00C0C700F10EE1 /* EnvironmentObjectExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76FC2B7C2D00C0C700F10EE1 /* EnvironmentObjectExample.swift */; }; 76FC2B852D00C49900F10EE1 /* FirstNavigationViewExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76FC2B842D00C49900F10EE1 /* FirstNavigationViewExample.swift */; }; 76FC2B872D00C4A100F10EE1 /* SecondNavigationViewExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76FC2B862D00C4A100F10EE1 /* SecondNavigationViewExample.swift */; }; + 76FC2B8A2D00CA4200F10EE1 /* TabViewExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76FC2B892D00CA4200F10EE1 /* TabViewExample.swift */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -45,6 +46,7 @@ 76FC2B7C2D00C0C700F10EE1 /* EnvironmentObjectExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EnvironmentObjectExample.swift; sourceTree = ""; }; 76FC2B842D00C49900F10EE1 /* FirstNavigationViewExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstNavigationViewExample.swift; sourceTree = ""; }; 76FC2B862D00C4A100F10EE1 /* SecondNavigationViewExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondNavigationViewExample.swift; sourceTree = ""; }; + 76FC2B892D00CA4200F10EE1 /* TabViewExample.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabViewExample.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -132,6 +134,7 @@ 76FC2B742D00B37D00F10EE1 /* Week4 */ = { isa = PBXGroup; children = ( + 76FC2B882D00CA2400F10EE1 /* TabView */, 76FC2B832D00C47B00F10EE1 /* Navigation */, 76FC2B772D00B7D000F10EE1 /* State */, ); @@ -158,6 +161,14 @@ path = Navigation; sourceTree = ""; }; + 76FC2B882D00CA2400F10EE1 /* TabView */ = { + isa = PBXGroup; + children = ( + 76FC2B892D00CA4200F10EE1 /* TabViewExample.swift */, + ); + path = TabView; + sourceTree = ""; + }; 76FC2DD82CE06C37000B329B /* Week2 */ = { isa = PBXGroup; children = ( @@ -261,6 +272,7 @@ 76FC2B872D00C4A100F10EE1 /* SecondNavigationViewExample.swift in Sources */, 76BD461B2CE10C9F00E215FE /* ComponentExample.swift in Sources */, 76FC2B712D00ABB600F10EE1 /* GridViewExample.swift in Sources */, + 76FC2B8A2D00CA4200F10EE1 /* TabViewExample.swift in Sources */, 76BD46132CE103C300E215FE /* ZStackExample.swift in Sources */, 76BD46112CE103AB00E215FE /* VStackHStackExample.swift in Sources */, ); diff --git a/LeeSeminSU/LeeSeminSU/Week4/TabView/TabViewExample.swift b/LeeSeminSU/LeeSeminSU/Week4/TabView/TabViewExample.swift new file mode 100644 index 0000000..57fc764 --- /dev/null +++ b/LeeSeminSU/LeeSeminSU/Week4/TabView/TabViewExample.swift @@ -0,0 +1,28 @@ +// +// TabViewExample.swift +// LeeSeminSU +// +// Created by 이세민 on 12/5/24. +// + +import SwiftUI + +struct TabViewExample: View { + var body: some View { + TabView { + Text("HOMESWEETHOME") + .tabItem { + Label("홈", systemImage: "house.fill") + } + + Text("SETTING") + .tabItem { + Label("설정", systemImage: "gearshape.fill") + } + } + } +} + +#Preview { + TabViewExample() +}