作者:无奈的双子星_403 | 来源:互联网 | 2023-05-18 08:47
ItwasworkingfineuntiltherecentupdatewhereithinkthenavigationitemshouldworkwiththeA
It was working fine until the recent update where i think the navigation item should work with the AutoLayout concept. I have been using it like this:
它工作正常,直到最近的更新,我认为导航项应该与AutoLayout概念一起使用。我一直在使用它:
let button = UIButton(frame: CGRect(origin: CGPoint.zero, size: CGSize(width: 30, height: 30)))
button.setImage(UIImage(named: "BackIcon"), for: UIControlState())
button.imageEdgeInsets = UIEdgeInsetsMake(0, -20, 0, 0)
button.addTarget((target != nil ? target! : self), action: backAction, for: .touchUpInside)
navigationItem.leftBarButtOnItem= UIBarButtonItem(customView: button)
what changes i should do to make it smooth cause at the moment it doesn't gets called on every tap, usually it's taking 2-3 times to get tapped in the same region.
我应该做些什么改变才能使它平滑,因为它不会在每次敲击时被调用,通常需要2-3次才能在同一区域内进行调整。
4 个解决方案