自定义形状,
This commit is contained in:
@@ -26,7 +26,6 @@ struct HomeView: View {
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.horizontal, 12)
|
||||
.background(Color.gray.opacity(0.2))
|
||||
}
|
||||
|
||||
var Search: some View {
|
||||
@@ -48,17 +47,17 @@ struct HomeView: View {
|
||||
Image(systemName: "bell")
|
||||
.resizable()
|
||||
.frame(width: 24, height: 24)
|
||||
.overlay(alignment: .topTrailing) {
|
||||
.overlay(
|
||||
Circle()
|
||||
.fill(Color.red.opacity(0.8))
|
||||
.frame(width: 20, height: 20)
|
||||
.overlay {
|
||||
.overlay(
|
||||
Text("20")
|
||||
.foregroundColor(Color.white)
|
||||
.font(.system(size: 12))
|
||||
}
|
||||
)
|
||||
.offset(x: 8, y: -10)
|
||||
}
|
||||
)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
@@ -243,14 +242,14 @@ struct HomeView: View {
|
||||
Image("Images/LaunchScreen")
|
||||
.resizable(resizingMode: /*@START_MENU_TOKEN@*/ .stretch/*@END_MENU_TOKEN@*/)
|
||||
.frame(maxWidth: 120, maxHeight: 150)
|
||||
.overlay(alignment: .bottom) {
|
||||
.overlay(
|
||||
Text("剩余100")
|
||||
.font(.system(size: 14))
|
||||
.foregroundColor(Color.white)
|
||||
.frame(maxWidth: .infinity)
|
||||
.padding(.vertical, 4)
|
||||
.background(Color.red.opacity(0.5))
|
||||
}
|
||||
)
|
||||
.cornerRadius(8)
|
||||
VStack {
|
||||
Text("石床垫:阿特伍德黑暗就故事(有的人说啥就是啥呢有的人说啥就是啥呢有的人说啥就是啥呢)")
|
||||
|
||||
Reference in New Issue
Block a user