Open wenchang1989 opened 4 years ago
解决这个问题只需把yylabel的父视图用yucontrol,对uicontrol添加事件,即可解决问题
添加outside事件
(void)touchesEnded:(NSSet<UITouch > )touches withEvent:(UIEvent *)event {
[self sendActionsForControlEvents:UIControlEventTouchUpOutside]; NSLog(@"=======--------**显示源内容"); }
能再详细一点吗?
对superView的手势添加代理,在shouldBegin或者shouldReceive方法中判断改点在YYLabel中是否有高亮部分即可,YYLabel有对应的方法,很好解决
解决这个问题只需把yylabel的父视图用yucontrol,对uicontrol添加事件,即可解决问题
添加outside事件
(void)touchesEnded:(NSSet<UITouch > )touches withEvent:(UIEvent *)event {
[self sendActionsForControlEvents:UIControlEventTouchUpOutside]; NSLog(@"=======--------**显示源内容"); }