jjzjj

touchHandled

全部标签

ios - 在点击 View 的一部分时,如何真正隐藏和显示标签栏? (没有按钮,但屏幕的任何位置)

overridefuncviewDidLoad(){lettap=UITapGestureRecognizer(target:self,action:#selector(touchHandled))view.addGestureRecognizer(tap)}@objcfunctouchHandled(){tabBarController?.hideTabBarAnimated(hide:true)}extensionUITabBarController{funchideTabBarAnimated(hide:Bool){UIView.animate(withDuration:2,an