Posts

Post not yet marked as solved
2 Replies
This issue appears in the form-input. I make a slide by copying an input box with an existing cursor. However, the cursor is not visible in version iOS13.1.The color of the cursor is already in the class(form-input).
Post not yet marked as solved
3 Replies
If I obfuscate the swift code, can I refuse to release the app? So I should let my source be open to others?
Post marked as solved
1 Replies
I thought a lot about this problem. So my conclusion is history.back() does not change the value of the bounce. Therefore, the bounce value is false.So I thought I should reinitialize this value. So I added a function in the section that completes page navigation.func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { if currentHtmlFileName == "Main.html" { scrollViewDidScroll(myWebView.scrollView) } }With this addition, the bounce value was reinitialized, and my refresh worked.
Post marked as solved
1 Replies
Turned out to be a bug, due to multiple installs and deletions of the app on the iPhone, so a simple iPhone restart fixed the bug, and it was able to register for notifications, and in the end, called the didRegisterForRemoteNotificationsWithDeviceToken delegate method.
Post not yet marked as solved
10 Replies
0: 00 ~ 0:16 : Share my app posts to other apps 0: 16 ~ 0 : 18 : Shut down all the apps that are running on your phone. 0: 18 ~ 0: 30 : Access the app that has the shared posts and click the posts. Then my app will run 0:30 ~ end : However, the first screen I see in my app should be the login screen, but it is the webview screen.
Post marked as solved
6 Replies
Just like the code you wrote in your answer, I changed my code the same way, and I got the following error.Reference to generic type 'Dictionary' requires arguments inInsert '<<#Key: Hashable#>, Any>'Click the fix button to change:Dictionary<<#Key: Hashable#>, Any>When creating a Dictionary, it appears that I must specify a type by default.Dictionary Examplevar dic : [Int : String] = [:] var dic2 = [Int : String]() var dic3 : Dictionary = [Int:String]() var dic4 : Dictionary<int, string=""> = Dictionary<int, string="">()But as you can see from my question, this is how I've already tried.let getdata = message.body as! [String : Any] print(getdata)
Post marked as solved
6 Replies
I tried change value But get errorfunc apiCall(_ param: Dictionary) { Reference to generic type 'Dictionary' requires arguments inInsert '<<#Key: Hashable#>, Any>'
Post marked as solved
1 Replies
I think I found a solution. But there's a problem. I can still see the animate image of the indicator. I don't think the search is complete.First WKWebView var openSecondScreen : SecondWebViewController! var preloadCheck = false ... func openSecondScreen(){ let storyboard = UIStoryboard(name: "Main", bundle: nil) openSecondScreen = storyboard.instantiateViewController(withIdentifier: "SecondWebViewController") as! SecondWebViewController openSecondScreen.delegate = self openSecondScreen.loadViewIfNeeded() openSecondScreen.secondWKWebView.uiDelegate = self openSecondScreen.secondWKWebView.navigationDelegate = self preloadCheck = true }.... func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { if preloadCheck { self.navigationController?.pushViewController(openSecondScreen, animated: true) preloadCheck = false } }Second WKWebViewfunc webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) { indicatorImage.isHidden = true indicatorImage.stopAnimating() }So I solved the problem by concealing an indicator image when the screen was shown.Second WKWebViewoverride func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) indicatorImage.isHidden = true indicatorImage.stopAnimating() }When you press the button to open the secondWebview screen, indicator images are displayed on the firstWebview screen, indicator images disappear when navigation is complete, and the secondWebview screen appears preloaded.
Post not yet marked as solved
10 Replies
https://drive.google.com/file/d/1sPC64-OMnFSTGIx-PlakLT93ulgrFCLG/view?usp=sharing Address with video.
Post not yet marked as solved
10 Replies
I mean, I turned off the app. I completely turned off the app behind me. And in time, I click on the data I shared on another app to move to my app, but I don't move to the login screen, I just watch the webview screen.
Post marked as solved
4 Replies
I separated the QR code scanning function into another ViewController.move QRcode ScanScreenlet storyboard = UIStoryboard(name: "Main", bundle: nil) let qrcode = storyboard.instantiateViewController(withIdentifier: "QRcodeViewController") as! QRcodeViewController qrcode.modalPresentationStyle = .overCurrentContext qrcode.modalTransitionStyle = .crossDissolve qrcode.delegate = self self.present(qrcode, animated: false, completion: nil)QRcodeViewControllerimport Foundation import UIKit import AVFoundation class QRcodeScannerViewController : UIViewController, AVCaptureMetadataOutputObjectsDelegate { var captureSession: AVCaptureSession! var previewLayer: AVCaptureVideoPreviewLayer! weak var delegate: SendQrcodeDataControllerDelegate? override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = UIColor.black captureSession = AVCaptureSession() guard let videoCaptureDevice = AVCaptureDevice.default(for: .video) else { return } let videoInput: AVCaptureDeviceInput do { videoInput = try AVCaptureDeviceInput(device: videoCaptureDevice) } catch { return } if (captureSession.canAddInput(videoInput)) { captureSession.addInput(videoInput) } else { failed() return } let metadataOutput = AVCaptureMetadataOutput() if (captureSession.canAddOutput(metadataOutput)) { captureSession.addOutput(metadataOutput) metadataOutput.setMetadataObjectsDelegate(self, queue: DispatchQueue.main) metadataOutput.metadataObjectTypes = [.qr] } else { failed() return } previewLayer = AVCaptureVideoPreviewLayer(session: captureSession) previewLayer.frame = view.layer.bounds previewLayer.videoGravity = .resizeAspectFill view.layer.addSublayer(previewLayer) captureSession.startRunning() } override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) if (captureSession?.isRunning == false) { captureSession.startRunning() } } override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) if (captureSession?.isRunning == true) { captureSession.stopRunning() } } func metadataOutput(_ output: AVCaptureMetadataOutput, didOutput metadataObjects: [AVMetadataObject], from connection: AVCaptureConnection) { captureSession.stopRunning() if let metadataObject = metadataObjects.first { guard let readableObject = metadataObject as? AVMetadataMachineReadableCodeObject else { return } guard let stringValue = readableObject.stringValue else { return } AudioServicesPlaySystemSound(SystemSoundID(kSystemSoundID_Vibrate)) found(code: stringValue) } self.dismiss(animated: true, completion: nil) } func found(code: String) { print(code) } func failed() { print("can not support camera") captureSession = nil } override var prefersStatusBarHidden: Bool { return true } override var supportedInterfaceOrientations: UIInterfaceOrientationMask { return .portrait } }
Post marked as solved
4 Replies
The two codes are within the same controller class.class WebViewController: UIViewController, WKUIDelegate, WKScriptMessageHandler, UIImagePickerControllerDelegate, UINavigationControllerDelegate, SKProductsRequestDelegate, UIScrollViewDelegate, AVCaptureMetadataOutputObjectsDelegate {