A
Size: a a a
o
o
o
D
o
o
D
o
V
body:
some View {
NavigationView {
VStack() {
Text("Оплата парковки").font(.title)
Text("Для оплаты, сфотографируйте штрих-код билета, который вы получили при въезде").foregroundColor(.gray).padding().font(.footnote)
if
self.scannedCode !=
nil {
NavigationLink("Next page", destination: NextView(scannedCode: scannedCode!), isActive: .constant(
true)).hidden()
}
Button("Сфотографировать штрих-код") {
self.scannedCode =
nil
self.isPresentingScanner =
true
}
.padding(5)
.background(Color.blue)
.foregroundColor(Color.white)
.clipShape(RoundedRectangle(cornerRadius: 5))
.font(.body)
.shadow( radius: 10, x: 5, y: 5)
Spacer()
.sheet(isPresented: $isPresentingScanner) {
self.scannerSheet
}
Spacer()
}
}
}
Spacer()
.sheet(isPresented: $isPresentingScanner) {
DG
Button("Сфотографировать штрих-код") {
self.scannedCode =
nil
self.isPresentingScanner =
true
}
.sheet(isPresented: $isPresentingScanner) {
self.scannerSheet }
.padding(5)
.background(Color.blue)
.foregroundColor(Color.white)
.clipShape(RoundedRectangle(cornerRadius: 5))
.font(.body)
.shadow( radius: 10, x: 5, y: 5)
Spacer()
A
DG
V
DG