Closed xclidongbo closed 5 years ago
已经解决. 需要用约束设置cancelButton的宽度. frame方式设置无效.
searchVC.cancelButton.widthAnchor.constraint(equalToConstant: 32).isActive = true searchVC.cancelButton.heightAnchor.constraint(equalToConstant: 32).isActive = true
参考链接:https://stackoverflow.com/questions/44442573/navigation-bar-rightbaritem-image-button-bug-ios-11