From 42f625b94fa511352e10c7467f1c8b57bb6c3b8b Mon Sep 17 00:00:00 2001 From: Christoph Hagen Date: Sun, 10 Jul 2022 14:12:08 +0200 Subject: [PATCH] Fix camera circle alignment --- Caps/Camera/CameraView.swift | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/Caps/Camera/CameraView.swift b/Caps/Camera/CameraView.swift index 51ef2fe..902d01b 100644 --- a/Caps/Camera/CameraView.swift +++ b/Caps/Camera/CameraView.swift @@ -48,6 +48,21 @@ struct CameraView: View { .padding(-CameraView.cameraImagePadding) ErrorView(error: model.error) + VStack { + Spacer() + HStack { + Spacer() + Text("") + .frame(width: circleSize, height: circleSize, alignment: .center) + .overlay(RoundedRectangle(cornerRadius: circleSize/2) + .stroke(lineWidth: circleStrength) + .foregroundColor(circleColor)) + //.background(Color(white: 1, opacity: 0.01)) + .onAppear(perform: didTapCircle) + Spacer() + }.padding(.bottom, 0) + Spacer() + } VStack { Spacer() HStack { @@ -78,22 +93,6 @@ struct CameraView: View { Spacer() } } - VStack { - Spacer() - HStack { - Spacer() - Text("") - .frame(width: circleSize, height: circleSize, alignment: .center) - .overlay(RoundedRectangle(cornerRadius: circleSize/2) - .stroke(lineWidth: circleStrength) - .foregroundColor(circleColor)) - .background(Color(white: 1, opacity: 0.01)) - .onAppear(perform: didTapCircle) - Spacer() - } - Spacer() - }.ignoresSafeArea() - } .onAppear() { model.startCapture()