init
This commit is contained in:
11
jason/Assets.xcassets/AccentColor.colorset/Contents.json
Normal file
11
jason/Assets.xcassets/AccentColor.colorset/Contents.json
Normal file
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
14
jason/Assets.xcassets/AppIcon.appiconset/Contents.json
Normal file
14
jason/Assets.xcassets/AppIcon.appiconset/Contents.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"filename" : "logo.jpg",
|
||||
"idiom" : "universal",
|
||||
"platform" : "ios",
|
||||
"size" : "1024x1024"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
jason/Assets.xcassets/AppIcon.appiconset/logo.jpg
Normal file
BIN
jason/Assets.xcassets/AppIcon.appiconset/logo.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 70 KiB |
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0x00",
|
||||
"green" : "0x66",
|
||||
"red" : "0xFF"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0xFF",
|
||||
"green" : "0x66",
|
||||
"red" : "0x00"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
6
jason/Assets.xcassets/Colors/Contents.json
Normal file
6
jason/Assets.xcassets/Colors/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
38
jason/Assets.xcassets/Colors/MainText.colorset/Contents.json
Normal file
38
jason/Assets.xcassets/Colors/MainText.colorset/Contents.json
Normal file
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0x23",
|
||||
"green" : "0x23",
|
||||
"red" : "0x23"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0xEF",
|
||||
"green" : "0xEF",
|
||||
"red" : "0xEF"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
{
|
||||
"colors" : [
|
||||
{
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0xFF",
|
||||
"green" : "0xFF",
|
||||
"red" : "0xFF"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
},
|
||||
{
|
||||
"appearances" : [
|
||||
{
|
||||
"appearance" : "luminosity",
|
||||
"value" : "dark"
|
||||
}
|
||||
],
|
||||
"color" : {
|
||||
"color-space" : "srgb",
|
||||
"components" : {
|
||||
"alpha" : "1.000",
|
||||
"blue" : "0x00",
|
||||
"green" : "0x00",
|
||||
"red" : "0x00"
|
||||
}
|
||||
},
|
||||
"idiom" : "universal"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
6
jason/Assets.xcassets/Contents.json
Normal file
6
jason/Assets.xcassets/Contents.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
9
jason/Assets.xcassets/Images/Contents.json
Normal file
9
jason/Assets.xcassets/Images/Contents.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
},
|
||||
"properties" : {
|
||||
"provides-namespace" : true
|
||||
}
|
||||
}
|
||||
BIN
jason/Assets.xcassets/Images/banner1.imageset/413.jpg
vendored
Normal file
BIN
jason/Assets.xcassets/Images/banner1.imageset/413.jpg
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 297 KiB |
21
jason/Assets.xcassets/Images/banner1.imageset/Contents.json
vendored
Normal file
21
jason/Assets.xcassets/Images/banner1.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "413.jpg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
jason/Assets.xcassets/Images/banner2.imageset/420.jpg
vendored
Normal file
BIN
jason/Assets.xcassets/Images/banner2.imageset/420.jpg
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 503 KiB |
21
jason/Assets.xcassets/Images/banner2.imageset/Contents.json
vendored
Normal file
21
jason/Assets.xcassets/Images/banner2.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "420.jpg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
jason/Assets.xcassets/Images/banner3.imageset/476.jpg
vendored
Normal file
BIN
jason/Assets.xcassets/Images/banner3.imageset/476.jpg
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 74 KiB |
21
jason/Assets.xcassets/Images/banner3.imageset/Contents.json
vendored
Normal file
21
jason/Assets.xcassets/Images/banner3.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "476.jpg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
BIN
jason/Assets.xcassets/Images/logo.imageset/3.jpg
vendored
Normal file
BIN
jason/Assets.xcassets/Images/logo.imageset/3.jpg
vendored
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
21
jason/Assets.xcassets/Images/logo.imageset/Contents.json
vendored
Normal file
21
jason/Assets.xcassets/Images/logo.imageset/Contents.json
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"filename" : "3.jpg",
|
||||
"idiom" : "universal",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
39
jason/Components/UserCardComponent.swift
Normal file
39
jason/Components/UserCardComponent.swift
Normal file
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// UserCardComponent.swift
|
||||
// jason
|
||||
//
|
||||
// Created by Jason on 2024/1/16.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct UserCardComponent: View {
|
||||
var body: some View {
|
||||
VStack (alignment: .leading, spacing: 8, content: {
|
||||
Spacer()
|
||||
Image("Images/logo")
|
||||
.resizable(resizingMode: /*@START_MENU_TOKEN@*/.stretch/*@END_MENU_TOKEN@*/)
|
||||
.aspectRatio(contentMode: .fit)
|
||||
.cornerRadius(8)
|
||||
.frame(width: 64,height: 64)
|
||||
Text("Jason.Chen")
|
||||
.font(.largeTitle)
|
||||
.foregroundColor(Color("ReversColor"))
|
||||
Text("PlaceholderPlaceholderPlaceholderPlaceholderPlaceholderPlaceholderPlaceholderPlaceholderPlaceholderPlaceholderPlaceholderPlaceholderPlaceholderPlaceholder")
|
||||
.font(.headline)
|
||||
.foregroundColor(Color("ReversColor"))
|
||||
.lineLimit(2)
|
||||
.multilineTextAlignment(/*@START_MENU_TOKEN@*/.leading/*@END_MENU_TOKEN@*/)
|
||||
})
|
||||
.padding(.all, 20)
|
||||
.frame(height: 300)
|
||||
.background(.ultraThinMaterial)
|
||||
.cornerRadius(10)
|
||||
.shadow(radius: 20)
|
||||
.padding(.horizontal, 10)
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
UserCardComponent()
|
||||
}
|
||||
17
jason/Controllers/ViewController.swift
Normal file
17
jason/Controllers/ViewController.swift
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// ViewController.swift
|
||||
// jason
|
||||
//
|
||||
// Created by Jason on 2024/1/16.
|
||||
//
|
||||
|
||||
import UIKit
|
||||
|
||||
class ViewController: UIViewController {
|
||||
|
||||
override func viewDidLoad() {
|
||||
super.viewDidLoad()
|
||||
|
||||
// Do any additional setup after loading the view.
|
||||
}
|
||||
}
|
||||
5
jason/Info.plist
Normal file
5
jason/Info.plist
Normal file
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict/>
|
||||
</plist>
|
||||
18
jason/Item.swift
Normal file
18
jason/Item.swift
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// Item.swift
|
||||
// jason
|
||||
//
|
||||
// Created by Jason on 2024/1/16.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import SwiftData
|
||||
|
||||
@Model
|
||||
final class Item {
|
||||
var timestamp: Date
|
||||
|
||||
init(timestamp: Date) {
|
||||
self.timestamp = timestamp
|
||||
}
|
||||
}
|
||||
18
jason/MyApp.swift
Normal file
18
jason/MyApp.swift
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// jasonApp.swift
|
||||
// jason
|
||||
//
|
||||
// Created by Jason on 2024/1/16.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import SwiftData
|
||||
|
||||
@main
|
||||
struct MyApp: App {
|
||||
var body: some Scene {
|
||||
WindowGroup {
|
||||
TabbarView()
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"info" : {
|
||||
"author" : "xcode",
|
||||
"version" : 1
|
||||
}
|
||||
}
|
||||
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