SVG UIBarbuttons正变得越来越大

时间:2017-06-22 10:21:21

标签: ios swift svg uibarbuttonitem

我使用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

有人可以帮我解决这个问题。

0 个答案:

没有答案