UIButton glow effect

北城余情 提交于 2019-12-12 05:28:06

问题


I need some help with UIButtons,

I was wondering how to get the glow effect that I set with the code below to respond to where the touch is.

[C setShowsTouchWhenHighlighted:YES];

The idea is that when the button is touched it will follow where the touch is.


回答1:


You have to do this yourself. Load a glow png into a UIImageView and add it into the view hierarchy. Then set the view's position based on touches.

http://i.imgur.com/RS2kQ.png



来源:https://stackoverflow.com/questions/8203571/uibutton-glow-effect

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