You Have to maintain in delegate Method. First You Have to implicate this Delegate, UIScrollViewDelegate. Then only its work@IBOutlet weak var webView: WKWebView!override func viewDidLoad() { super.viewDidLoad() self.webView.scrollView.delegate = self}//MARK: - UIScrollViewDelegatefunc scrollViewWillBeginZooming(_ scrollView: UIScrollView, with view: UIView?) { scrollView.pinchGestureRecognizer?.isEnabled = false}I Think It may Useful.
Post
Replies
Boosts
Views
Activity
Use Tag Value To Change your image View, Based On Tag U Can image View images without any another variable. I only told to change only3 images in between them if u want more than u have to maintain tags.@IBOutlet func changeImageBtnTouchUpInside(_ sender:UIButton){ if(sender.tag == 0){ myimageView.image = UIImage(named: "firstImage") sender.tag = 1 }else if(sender.tag == 1){ myimageView.image = UIImage(named: "secondImage") sender.tag = 2 }else if(sender.tag == 2){ myimageView.image = UIImage(named: "thirdImage") sender.tag = 0 }}
This error can occur when you rename files outside of XCode. To solve it you can just remove the files from your project (Right Click - Delete and "Remove Reference").Then after you can re-import the files in your project and everything will be OK.
Is it Working Fine.