0
你好,我创建一个QR码阅读器和工作的伟大,但在Safari THETA打开网址,我想在我的WebView Swift在另一个场景中打开它负载网址
if metadataObj.type == AVMetadataObjectTypeQRCode {
// If the found metadata is equal to the QR code metadata then update the status label's text and set the bounds
let barCodeObject = videoPreviewLayer?.transformedMetadataObjectForMetadataObject(metadataObj as AVMetadataMachineReadableCodeObject) as! AVMetadataMachineReadableCodeObject
qrCodeFrameView?.frame = barCodeObject.bounds;
if metadataObj.stringValue != nil {
messageLabel.text = metadataObj.stringValue
//if the result is url...
UIApplication.sharedApplication().openURL(NSURL(string: metadataObj.stringValue)!)
}
}
我有2个不同的文件的Web查看其在* ViewController.swift * 和QR码扫描仪其* QRRViewController.swift * – d00nn123
好吧,你在哪里想要显示网页视图? – Scriptable
我想要从QR码(连接类QRRViewController.swift)扫描后显示webview中的网站(连接类ViewController.swift) – d00nn123