How to enable touch for tabBaar specific UIViewcontroller
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
if let touch = touches.first {
let currentPoint = touch.location(in: self.tabBarController?.viewControllers?.index(after: 1))
if button.frame.contains(currentPoint){
self.buttonAction(sender: button)
}
}
}
getting this error
Type of expression is ambiguous without more context
when added
let currentPoint = touch.location(in: self.tabBar)
Touch actions showing in other UIViewController
after pushing from UITabBarController
question from:
https://stackoverflow.com/questions/66048046/enable-touch-for-tabbar-specific-uiviewcontroller 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…