This commit is contained in:
2024-01-16 22:55:44 +08:00
commit b4f90a9019
36 changed files with 1282 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
{
"colors" : [
{
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@@ -0,0 +1,14 @@
{
"images" : [
{
"filename" : "logo.jpg",
"idiom" : "universal",
"platform" : "ios",
"size" : "1024x1024"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@@ -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
}
}

View File

@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View 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
}
}

View File

@@ -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
}
}

View File

@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View File

@@ -0,0 +1,9 @@
{
"info" : {
"author" : "xcode",
"version" : 1
},
"properties" : {
"provides-namespace" : true
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 297 KiB

View 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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 503 KiB

View 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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View 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
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View 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
}
}

View 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()
}

View 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
View 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
View 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
View 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()
}
}
}

View File

@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}

View 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()
}

View 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()
}

View 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()
}

View 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()
}