import SwiftUI
struct ContentView: View {
let customHeight = UIScreen.main.bounds.height * 0.5
let customWidth = UIScreen.main.bounds.width * 0.5
var body: some View {
ZStack {
Rectangle()
.fill(Color.red)
.edgesIgnoringSafeArea(.all)
VStack(alignment: .center, spacing: 20) {
Text("Custom QR Scanner").font(.largeTitle).bold()
CustomQRRepresentable(completion: self.getQRCode).frame(width: self.customWidth, height: self.customWidth)
}
}
}
func getQRCode(_ code: String) {
print(code)
}
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.