Ios t将物体贴到屏幕底部
我遇到了一个问题-我无法将文本附加到屏幕底部-文本(“文本”(ббббббббббббббббббббббб。我尝试使用堆栈{space()item},但是对象刚好离开屏幕的视野。我做错了什么 p.S.文本(“бббббббббббббббб107 iphoneSE: iphone11:Ios t将物体贴到屏幕底部,ios,swift,xcode,view,swiftui,Ios,Swift,Xcode,View,Swiftui,我遇到了一个问题-我无法将文本附加到屏幕底部-文本(“文本”(ббббббббббббббббббббббб。我尝试使用堆栈{space()item},但是对象刚好离开屏幕的视野。我做错了什么 p.S.文本(“бббббббббббббббб107 iphoneSE: iphone11: 尝试使用.position(x:UIScreen.main.bounds.size.height)定位屏幕。 您可以将此扩展用于更干净的代码- extension UIScreen { static l
尝试使用
.position(x:UIScreen.main.bounds.size.height)定位屏幕。
您可以将此扩展用于更干净的代码-
extension UIScreen {
static let screenWidth = UIScreen.main.bounds.size.width
static let screenHeight = UIScreen.main.bounds.size.height
static let screenSize = UIScreen.main.bounds.size
}
如果你想更准确,你可以这样做GeometryReader-
GeometryReader { geo in
Text("Общи условия и поверителност")
.potision(x: UIScreen.screenHeight - geo.safeAreaInsets.top)
}
这还将包括计算中的安全区域尝试使用
.position(x:UIScreen.main.bounds.size.height)定位屏幕
您可以将此扩展用于更干净的代码-
extension UIScreen {
static let screenWidth = UIScreen.main.bounds.size.width
static let screenHeight = UIScreen.main.bounds.size.height
static let screenSize = UIScreen.main.bounds.size
}
如果你想更准确,你可以这样做GeometryReader-
GeometryReader { geo in
Text("Общи условия и поверителност")
.potision(x: UIScreen.screenHeight - geo.safeAreaInsets.top)
}
这也将包括计算中的安全区域
尝试使用.position(x: UIScreen.main.bounds.size.height) 您可以将此扩展用于更干净的代码-
extension UIScreen {
static let screenWidth = UIScreen.main.bounds.size.width
static let screenHeight = UIScreen.main.bounds.size.height
static let screenSize = UIScreen.main.bounds.size
}
扩展UIScreen{静态let屏幕宽度=
UIScreen.main.bounds.size.width静态let屏幕高度=
UIScreen.main.bounds.size.height静态let屏幕大小=
UIScreen.main.bounds.size}如果希望更准确,可以
像这样的GeometryReader-
GeometryReader { geo in
Text("Общи условия и поверителност")
.potision(x: UIScreen.screenHeight - geo.safeAreaInsets.top)
}
GeometryReader{geo在文本中(“бббббббббббббббб
.potision(x:UIScreen.screenHeight-geo.safeAreaInsets.top)}这也将包括计算中的safeArea
@阿维普罗菲索斯基-
该对象已消失,但您仍可以单击它并转到另一个屏幕
欧欧欧
尝试使用.position(x: UIScreen.main.bounds.size.height) 您可以将此扩展用于更干净的代码-
extension UIScreen {
static let screenWidth = UIScreen.main.bounds.size.width
static let screenHeight = UIScreen.main.bounds.size.height
static let screenSize = UIScreen.main.bounds.size
}
扩展UIScreen{静态let屏幕宽度=
UIScreen.main.bounds.size.width静态let屏幕高度=
UIScreen.main.bounds.size.height静态let屏幕大小=
UIScreen.main.bounds.size}如果希望更准确,可以
像这样的GeometryReader-
GeometryReader { geo in
Text("Общи условия и поверителност")
.potision(x: UIScreen.screenHeight - geo.safeAreaInsets.top)
}
GeometryReader{geo在文本中(“бббббббббббббббб
.potision(x:UIScreen.screenHeight-geo.safeAreaInsets.top)}这也将包括计算中的safeArea
@阿维普罗菲索斯基-
该对象已消失,但您仍可以单击它并转到另一个屏幕
o_oSwiftUI(因为你说的是
Stack{space()item}
)?还是自动布局/框架?@aheze i menia StackSwiftUI我猜(因为你说的是Stack{space()item}
)?还是自动布局/框架?@aheze i menia Stack