Karten: Auto-Zentrieren beim Erscheinen via .onAppear (.onChange bleibt)
This commit is contained in:
parent
a6ea7b5b8f
commit
70e0a238e9
2 changed files with 2 additions and 0 deletions
|
|
@ -66,6 +66,7 @@ struct GiftkoederView: View {
|
||||||
}
|
}
|
||||||
.frame(height: 260)
|
.frame(height: 260)
|
||||||
.ignoresSafeArea(edges: .top)
|
.ignoresSafeArea(edges: .top)
|
||||||
|
.onAppear { centerOn(coord) }
|
||||||
.overlay(alignment: .topTrailing) {
|
.overlay(alignment: .topTrailing) {
|
||||||
Button {
|
Button {
|
||||||
centerOn(coord)
|
centerOn(coord)
|
||||||
|
|
|
||||||
|
|
@ -87,6 +87,7 @@ struct VerloreneHundeView: View {
|
||||||
}
|
}
|
||||||
.frame(height: 260)
|
.frame(height: 260)
|
||||||
.ignoresSafeArea(edges: .top)
|
.ignoresSafeArea(edges: .top)
|
||||||
|
.onAppear { centerOn(coord) }
|
||||||
.overlay(alignment: .topTrailing) {
|
.overlay(alignment: .topTrailing) {
|
||||||
Button {
|
Button {
|
||||||
centerOn(coord)
|
centerOn(coord)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue