摘要: 原生UISlider用作进度条时没有提供单击事件的接口,通过继承在子类中实现单击事件又有杀鸡用牛刀的感觉,于是考虑在Category中实现。创建UISlider+touch.h和UISlider+touch.m文件,添加单击事件方法:1 @interface UISlider (touch)2 // 单击手势3 - (void)addTapGestureWithTarget:(id)target4 action:(SEL)action;5 @end实现原理是为UISlider对象添加UITapGestureRecognizer,当触发tap事件... 阅读全文
posted @ 2013-04-24 16:18 Azure_Sagi 阅读(952) 评论(0) 推荐(0) 编辑