I’m not sure why this is happening but you can use what others have suggested, or use the midX
and midY
from GeometryProxy
‘s frame. Like the following:
var body: some View {
GeometryReader { geometry in
ImageContent()
.position(x: geometry.frame(in: .local).midX, y: geometry.frame(in: .local).midY)
}
}