feat(View): 增加 ProfileView
增加 ProfileView Signed-off-by: Ching <loooching@gmail.com>
This commit is contained in:
parent
8392e8a86e
commit
457829794d
@ -23,6 +23,8 @@
|
||||
24C1E5962A07A9D300F09364 /* Avatar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24C1E5952A07A9D300F09364 /* Avatar.swift */; };
|
||||
24C1E59A2A07AC6D00F09364 /* ToolBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24C1E5992A07AC6D00F09364 /* ToolBar.swift */; };
|
||||
24C1E59C2A07BB5C00F09364 /* NotificationRow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24C1E59B2A07BB5C00F09364 /* NotificationRow.swift */; };
|
||||
24C1E5A12A07C9DE00F09364 /* ProfileView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24C1E5A02A07C9DE00F09364 /* ProfileView.swift */; };
|
||||
24C1E5A32A07CA0000F09364 /* ProfileTabView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24C1E5A22A07CA0000F09364 /* ProfileTabView.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
@ -44,6 +46,8 @@
|
||||
24C1E5952A07A9D300F09364 /* Avatar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Avatar.swift; sourceTree = "<group>"; };
|
||||
24C1E5992A07AC6D00F09364 /* ToolBar.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ToolBar.swift; sourceTree = "<group>"; };
|
||||
24C1E59B2A07BB5C00F09364 /* NotificationRow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NotificationRow.swift; sourceTree = "<group>"; };
|
||||
24C1E5A02A07C9DE00F09364 /* ProfileView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileView.swift; sourceTree = "<group>"; };
|
||||
24C1E5A22A07CA0000F09364 /* ProfileTabView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProfileTabView.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
@ -114,6 +118,7 @@
|
||||
24A07CE02A02702800F4ECA8 /* Core */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
24C1E59D2A07C9C800F09364 /* Profile */,
|
||||
24A07CFE2A07A30200F4ECA8 /* Notification */,
|
||||
24A07CF62A076E2C00F4ECA8 /* MainTab */,
|
||||
24A07CEE2A03E7BA00F4ECA8 /* Feeds */,
|
||||
@ -241,6 +246,31 @@
|
||||
path = ViewModels;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
24C1E59D2A07C9C800F09364 /* Profile */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
24C1E59F2A07C9D300F09364 /* ViewModels */,
|
||||
24C1E59E2A07C9CE00F09364 /* Views */,
|
||||
);
|
||||
path = Profile;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
24C1E59E2A07C9CE00F09364 /* Views */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
24C1E5A02A07C9DE00F09364 /* ProfileView.swift */,
|
||||
24C1E5A22A07CA0000F09364 /* ProfileTabView.swift */,
|
||||
);
|
||||
path = Views;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
24C1E59F2A07C9D300F09364 /* ViewModels */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
path = ViewModels;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
@ -313,11 +343,13 @@
|
||||
files = (
|
||||
24C1E59A2A07AC6D00F09364 /* ToolBar.swift in Sources */,
|
||||
24A07CD22A026DDA00F4ECA8 /* ContentView.swift in Sources */,
|
||||
24C1E5A32A07CA0000F09364 /* ProfileTabView.swift in Sources */,
|
||||
24C1E5962A07A9D300F09364 /* Avatar.swift in Sources */,
|
||||
24A07CFC2A07A26A00F4ECA8 /* TimeLineTabView.swift in Sources */,
|
||||
24A07CF32A03E80200F4ECA8 /* TimeLineView.swift in Sources */,
|
||||
24C1E59C2A07BB5C00F09364 /* NotificationRow.swift in Sources */,
|
||||
24A07CD02A026DDA00F4ECA8 /* dudujiApp.swift in Sources */,
|
||||
24C1E5A12A07C9DE00F09364 /* ProfileView.swift in Sources */,
|
||||
24A07D052A07A33900F4ECA8 /* NotificationTabView.swift in Sources */,
|
||||
24A07CFA2A076E5400F4ECA8 /* MainTabView.swift in Sources */,
|
||||
24A07CEB2A029C6A00F4ECA8 /* InstanceInfo.swift in Sources */,
|
||||
|
||||
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Bucket
|
||||
uuid = "A4DDCD50-3359-449D-99F9-33201ED50B0B"
|
||||
type = "1"
|
||||
version = "2.0">
|
||||
</Bucket>
|
||||
25
duduji/Core/Profile/Views/ProfileTabView.swift
Normal file
25
duduji/Core/Profile/Views/ProfileTabView.swift
Normal file
@ -0,0 +1,25 @@
|
||||
//
|
||||
// ProfileTabView.swift
|
||||
// duduji
|
||||
//
|
||||
// Created by ching on 2023/5/7.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ProfileTabView: View {
|
||||
var body: some View {
|
||||
NavigationStack {
|
||||
ProfileView()
|
||||
// .toolbar {
|
||||
// ToolBar()
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct ProfileTabView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
ProfileTabView()
|
||||
}
|
||||
}
|
||||
87
duduji/Core/Profile/Views/ProfileView.swift
Normal file
87
duduji/Core/Profile/Views/ProfileView.swift
Normal file
@ -0,0 +1,87 @@
|
||||
//
|
||||
// ProfileView.swift
|
||||
// duduji
|
||||
//
|
||||
// Created by ching on 2023/5/7.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct ProfileView: View {
|
||||
var body: some View {
|
||||
VStack(alignment: .leading) {
|
||||
// banner & avarta
|
||||
HStack {
|
||||
Color(.systemRed)
|
||||
}
|
||||
.frame(height: 192)
|
||||
// .ignoresSafeArea()
|
||||
|
||||
// user stats
|
||||
HStack(alignment: .top, spacing: 12) {
|
||||
RoundedRectangle(cornerRadius: 6)
|
||||
.fill(Color.blue)
|
||||
.frame(width: 96, height: 96)
|
||||
.overlay(
|
||||
RoundedRectangle(cornerRadius: 6)
|
||||
.stroke(.gray.opacity(0.5), lineWidth: 2)
|
||||
)
|
||||
.padding(.horizontal)
|
||||
.offset(y: -40)
|
||||
Spacer()
|
||||
VStack {
|
||||
Text("1234")
|
||||
.bold()
|
||||
.font(.title3)
|
||||
.foregroundColor(.cyan)
|
||||
Text("嘟文")
|
||||
.foregroundColor(.gray)
|
||||
}
|
||||
VStack {
|
||||
Text("1234")
|
||||
.bold()
|
||||
.font(.title3)
|
||||
.foregroundColor(.cyan)
|
||||
Text("关注")
|
||||
.foregroundColor(.gray)
|
||||
}
|
||||
VStack {
|
||||
Text("1234")
|
||||
.bold()
|
||||
.font(.title3)
|
||||
.foregroundColor(.cyan)
|
||||
Text("粉丝")
|
||||
.foregroundColor(.gray)
|
||||
}
|
||||
}
|
||||
.padding(.bottom, -50)
|
||||
.padding(.trailing)
|
||||
|
||||
// user info
|
||||
HStack(alignment: .firstTextBaseline) {
|
||||
VStack(alignment: .leading, spacing: 6) {
|
||||
Text("科代")
|
||||
.font(.title3)
|
||||
.bold()
|
||||
Text("@Kedai")
|
||||
.foregroundColor(.gray)
|
||||
HStack(spacing: 2) {
|
||||
Image(systemName: "calendar")
|
||||
Text("加入于 2021 年 11 月 12 日")
|
||||
}
|
||||
.foregroundColor(.gray)
|
||||
.font(.caption)
|
||||
}
|
||||
.padding()
|
||||
}
|
||||
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
struct ProfileView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
ProfileView()
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user