![](/img/trans.png)
[英]Navigating to List View in SwiftUI immediately shifts the list upward offscreen
[英]Layout SwiftUI List cells from bottom upward
struct FlipEffect: GeometryEffect {
func effectValue(size: CGSize) -> ProjectionTransform {
let t = CGAffineTransform(a: 1, b: 0, c: 0, d: -1, tx: 0, ty: size.height)
return ProjectionTransform(t)
}
}
struct ContentView: View {
var body: some View {
List(0..<100) { item in
Text("hello, world")
.modifier(FlipEffect())
}
.modifier(FlipEffect())
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.