UIButton发光效果 [英] UIButton glow effect

查看:127
本文介绍了UIButton发光效果的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要有关UIButtons的帮助,

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.

推荐答案

您必须自己执行此操作.将glow png加载到UIImageView中,并将其添加到视图层次结构中.然后根据触摸设置视图的位置.

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

这篇关于UIButton发光效果的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆