在使用SwiftUI时,我在视图中将“ twitter”图像置于较高位置时遇到问题。我想使Twitter图片更高,使其更接近我的两个Blob图片,并在Twitter图片和“登录我的帐户”短语之间添加间距。另外,我正在尝试获取我的UITextfield,现在我猜想它只是文本字段,当在我的“登录到您的帐户短语”下方单击时,它会随键盘显示,但是现在显示在我的视图中。
GeometryReader { (deviceSize: GeometryProxy) in
ZStack {
//Define a screen color
LinearGradient (gradient: Gradient(colors:[Color(ColorsSaved.gitLabdark),Color(ColorsSaved.gitLabLight)]),startPoint: .leading,endPoint: .trailing)
//Extend the screen to all edges
.edgesIgnoringSafeArea(.all)
Image("blobVectorLight")
.resizable()
.frame(width: deviceSize.size.height * (220/812) * 0.81,height: deviceSize.size.height * (220/812),alignment: .topTrailing)
.frame(width: deviceSize.size.width,height:deviceSize.size.height,alignment: .topTrailing)
.edgesIgnoringSafeArea(.all)
Image("blobVectordark")
.resizable()
.frame(width: deviceSize.size.height * (208/812) * 0.74,height: deviceSize.size.height * (208/812),alignment: .topTrailing)
// .overlay(Image("blobVectorLight"))
.frame(width: deviceSize.size.width,alignment: .topTrailing)
.edgesIgnoringSafeArea(.all)
VStack{
Image ("twitter")
.resizable()
.frame(width: deviceSize.size.height*(77/812)*2.078,height: deviceSize.size.height*(77/812))
Text ("Sign into your account")
.foregroundColor(.white)
TextField ("username")
}
}
}
}
}