我使用SVG图像将其转换为PDF格式。但有时,那些barbutton
项目变得非常大。我遇到此问题的最多次数是使用UIAlertController
时(例如:显示提醒,显示操作表)
以下是我用来将SVG指定为UIBarButton
s
let search:UIButton = Utilities.getButton(forTitle: "", buttonType: .custom, image: IMAGE_SEARCH_SVG);
search.addTarget(self, action: #selector(handleSearchAction), for: .touchUpInside)
search.bounds = CGRect(x: 0, y: 0, width: H20, height: H20)
let searchBarBtnItem = UIBarButtonItem(customView: search)
self.navigationItem.rightBarButtonItem = searchBarBtnItem
u can see search icon on the top
on showing UIAlertAction,the search icon became big
有人可以帮我解决这个问题。