【发布时间】:2021-02-11 01:09:38
【问题描述】:
*我创建了这个视图,当在我的应用程序的主视图中点击一个按钮时,它显示为一个工作表。我想知道是否有办法删除底部搜索按钮后面的白色背景?抱歉,如果这些信息不够多,请告诉我,我会添加更多信息
import SwiftUI
struct AddDoujin: View {
//variables
var body: some View {
GeometryReader{ geo in
ZStack {
VStack{
HStack{
Form {
Text("Enter The Sauce:")
TextField("Enter the Sauce Degen", text:$InputDoujin, onCommit: {
UIApplication.shared.keyWindow?.endEditing(true)
})
.keyboardType(.numberPad)
//Code
}
//The button checks if it needs to be redone or not
//If it doesnt it closes the sheet while also calling the api
ZStack{
Button(action: {
//Action
}
}){
ZStack {
Circle()
.foregroundColor(Color("DarkPurple"))
.frame(width: 80, height: 80)
Text("Search")
}
}
}
}
.buttonStyle(PlainButtonStyle())
}
}
}
}
struct AddDoujin_Previews: PreviewProvider {
static var previews: some View {
AddDoujin(DoujinApi: DoujinAPI(), isPresented: .constant(false))
}
}
【问题讨论】:
-
用完这个应用程序后告诉我? ????
-
@aheze 我的意思是如果你查看我的 GitHub,我已经有类似的东西了。不过,目前的这个会好 10 倍。
-
哦,太好了!完美的!我去看看。
-
@aheze 你能给我发消息吗?我有一个问题
-
当然,我的不和谐是 aheze#3125