setBackgroundImage for UIBarButtonItem via appearance not working for other UIControlStates

可紊 提交于 2019-12-06 14:36:51

I found the solution to the problem. My images are 30x30px and I set the resizable endcaps to

UIEdgeInsetsMake(0, 15, 0, 15)

by setting those 15's to 14's, the problem went away. So best not to make endcaps the exact half of the image width.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!