t
This commit is contained in:
parent
2b506ce538
commit
155a175635
@ -21,7 +21,6 @@ struct ContentView: View {
|
||||
}
|
||||
TabBarView(selectedTab: $selectedTab)
|
||||
}
|
||||
.background(Color("background"))
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -72,7 +72,7 @@ struct ScheduleView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.background(.secondary.opacity(0.1))
|
||||
.background(Color("background"))
|
||||
.onAppear(perform: {
|
||||
if weekSlider.isEmpty {
|
||||
let currentWeek = Date().fetchWeek()
|
||||
|
@ -13,37 +13,34 @@ struct SearchBarView: View {
|
||||
.padding(.trailing, 7)
|
||||
TextField("Поиск группы", text: $text)
|
||||
.disableAutocorrection(true)
|
||||
.frame(width: .infinity, height: 40)
|
||||
.onTapGesture {
|
||||
self.isEditing = true
|
||||
}
|
||||
.onSubmit {
|
||||
self.isEditing = false
|
||||
}
|
||||
if isEditing {
|
||||
Button {
|
||||
self.text = ""
|
||||
self.isEditing = false
|
||||
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
|
||||
} label: {
|
||||
Image(systemName: "xmark.circle.fill")
|
||||
.padding(.trailing, 20)
|
||||
.offset(x: 10)
|
||||
.foregroundColor(.gray)
|
||||
.background(
|
||||
Rectangle()
|
||||
.frame(width: 40, height: 40)
|
||||
.foregroundColor(.white)
|
||||
.cornerRadius(15)
|
||||
)
|
||||
}
|
||||
.background(Color.white)
|
||||
}
|
||||
else {
|
||||
ZStack {
|
||||
Rectangle()
|
||||
.frame(width: 40, height: 40)
|
||||
.foregroundColor(.white)
|
||||
.cornerRadius(15)
|
||||
Group {
|
||||
if isEditing {
|
||||
Button {
|
||||
self.text = ""
|
||||
self.isEditing = false
|
||||
UIApplication.shared.sendAction(#selector(UIResponder.resignFirstResponder), to: nil, from: nil, for: nil)
|
||||
} label: {
|
||||
Image(systemName: "xmark.circle.fill")
|
||||
.padding(.trailing, 20)
|
||||
.offset(x: 10)
|
||||
.foregroundColor(.gray)
|
||||
.background(
|
||||
)
|
||||
}
|
||||
.background(Color.white)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.background(
|
||||
@ -56,7 +53,7 @@ struct SearchBarView: View {
|
||||
} label: {
|
||||
ZStack {
|
||||
Rectangle()
|
||||
.frame(width: 36, height: 36)
|
||||
.frame(width: 40)
|
||||
.foregroundStyle(Color("blueColor"))
|
||||
.cornerRadius(15)
|
||||
Image(systemName: "plus")
|
||||
@ -67,9 +64,9 @@ struct SearchBarView: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(width: .infinity)
|
||||
.padding(.horizontal)
|
||||
.padding(.vertical, 5)
|
||||
.padding(.top, 5)
|
||||
.frame(height: 40)
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user