init
This commit is contained in:
24
jason/Views/Explore/ExploreView.swift
Normal file
24
jason/Views/Explore/ExploreView.swift
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// ExploreView.swift
|
||||
// jason
|
||||
//
|
||||
// Created by Jason on 2024/1/16.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ExploreView: View {
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
VStack (alignment: .leading) {
|
||||
UserCardComponent()
|
||||
Text("item")
|
||||
}
|
||||
}
|
||||
.background(Color.green)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
ExploreView()
|
||||
}
|
||||
24
jason/Views/Home/HomeView.swift
Normal file
24
jason/Views/Home/HomeView.swift
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// ContentView.swift
|
||||
// jason
|
||||
//
|
||||
// Created by Jason on 2024/1/16.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import SwiftData
|
||||
|
||||
struct HomeView: View {
|
||||
var body: some View {
|
||||
ScrollView{
|
||||
VStack(alignment: .leading, content: {
|
||||
UserCardComponent()
|
||||
})
|
||||
}
|
||||
.background(Color.orange)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
HomeView()
|
||||
}
|
||||
38
jason/Views/TabbarView.swift
Normal file
38
jason/Views/TabbarView.swift
Normal file
@@ -0,0 +1,38 @@
|
||||
//
|
||||
// TabbarView.swift
|
||||
// jason
|
||||
//
|
||||
// Created by Jason on 2024/1/16.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct TabbarView: View {
|
||||
var body: some View {
|
||||
TabView() {
|
||||
HomeView()
|
||||
.tabItem {
|
||||
Image(systemName: "house")
|
||||
Text("Home")
|
||||
}
|
||||
.tag(1)
|
||||
ExploreView()
|
||||
.tabItem {
|
||||
Image(systemName: "magnifyingglass")
|
||||
Text("Explore")
|
||||
}
|
||||
.tag(2)
|
||||
UserView()
|
||||
.tabItem {
|
||||
Image(systemName: "person")
|
||||
Text("User")
|
||||
}
|
||||
.tag(3)
|
||||
}
|
||||
.background(Color.white)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
TabbarView()
|
||||
}
|
||||
24
jason/Views/User/UserView.swift
Normal file
24
jason/Views/User/UserView.swift
Normal file
@@ -0,0 +1,24 @@
|
||||
//
|
||||
// UserView.swift
|
||||
// jason
|
||||
//
|
||||
// Created by Jason on 2024/1/16.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct UserView: View {
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
VStack (alignment: .leading) {
|
||||
UserCardComponent()
|
||||
Text("item")
|
||||
}
|
||||
}
|
||||
.background(Color.red)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
UserView()
|
||||
}
|
||||
Reference in New Issue
Block a user