0
我有一个navBar控制器连接到UIView,我有一个正确的酒吧按钮项目是雪佛龙。我用编程方式创建了一个搜索栏。如果你点击约20-100倍的雪佛龙,它会不断增长,直到它离开屏幕。我可以看到每次点击我的搜索栏中略微凹凸的雪佛龙。由于您不能在navBar上放置约束,并且固定的空格键按钮项也不起作用。任何建议在哪里看或如何解决这个问题?Swift ios 10 NavBar项目不断增加
func rotateChevron(animated: Bool = true) {
let chevAnimate = animated ? 0.3 : 0.0
let chevIsDown = messagePicker.frame.origin.y == self.view.frame.height - (tabBarController?.tabBar.frame.height ?? 0)
let rotation: CGFloat = chevIsDown ? 0.0 : 180.001
UIView.animate(withDuration: chevAnimate, animations: {
self.filterChevron.customView?.transform = CGAffineTransform(rotationAngle: rotation.degreesToRadians)
}, completion: nil)
}