一个图标的优化
This commit is contained in:
Binary file not shown.
@@ -13,13 +13,13 @@ struct HomeView: View {
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
VStack(spacing: 12) {
|
||||
// Search
|
||||
Search
|
||||
// Banner
|
||||
// Navigation
|
||||
// TodayKill
|
||||
// Living
|
||||
// Bestselling
|
||||
PartyReading
|
||||
// PartyReading
|
||||
// NewBooks
|
||||
// Categories
|
||||
}
|
||||
@@ -271,18 +271,22 @@ struct HomeView: View {
|
||||
.padding(12)
|
||||
.background(Color.white)
|
||||
.cornerRadius(32)
|
||||
ZStack {
|
||||
Image(systemName: "bell").resizable().frame(width: 24, height: 24)
|
||||
Text("9")
|
||||
.font(.system(size: 12))
|
||||
.padding(4)
|
||||
.frame(minWidth: 24)
|
||||
.background(Color.red)
|
||||
.foregroundColor(Color.white)
|
||||
.cornerRadius(99)
|
||||
.offset(x: 10, y: -10)
|
||||
}
|
||||
.padding(.trailing, 12)
|
||||
Image(systemName: "bell")
|
||||
.resizable()
|
||||
.frame(width: 24, height: 24)
|
||||
.overlay(alignment: .topTrailing) {
|
||||
Circle()
|
||||
.fill(Color.red)
|
||||
.frame(width: 20, height: 20)
|
||||
.offset(x: 4, y: -8)
|
||||
}
|
||||
.overlay(alignment: .topTrailing) {
|
||||
Text("20")
|
||||
.foregroundColor(Color.white)
|
||||
.font(.system(size: 12))
|
||||
.offset(x: 2, y: -5)
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user