Set UIButton image in interface builder / storyboard

旧街凉风 提交于 2019-12-10 12:33:09

问题


I have a View Controller which I add a round rect button to in storyboard. The application is working well and I also connected the button to a segue using the storyboard. I am trying to set a custom image for this button for it on&off states. How do i access this button and set it's properties? (in this case the on & off images)


回答1:


Here is a screenshot :

Set your button type to Custom, and change the image for all the states (choose a state, then choose the image, repeat for each state).



来源:https://stackoverflow.com/questions/9539834/set-uibutton-image-in-interface-builder-storyboard

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