Search code examples
iphoneobjective-ccocoa-touchuibuttonglow

UIButton glow effect


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.


Solution

  • 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.

    https://i.sstatic.net/iDlkm.png