UIImageView点击是现实高亮图,放手时现实默认图

让UIImageView点击是现实高亮图,放手时现实默认图!


方法如下:

- (void)touchesBegan:(NSSet *) touches withEvent:(UIEvent *) event



{
    _bubbleBg.highlighted = YES;
    CarmenLog(@"touchesBegan");
    
}
- (void)touchesMoved:(NSSet *) touches withEvent:(UIEvent *) event


{
    CarmenLog(@"touchesMoved");
}
- (void)touchesEnded:(NSSet *) touches withEvent:(UIEvent *) event
{
    CarmenLog(@"touchesEnded");
}
- (void)touchesCancelled:(NSSet *) touches withEvent:(UIEvent *) event
{
     _bubbleBg.highlighted = NO;
    CarmenLog(@"touchesCancelled");
}

你可能感兴趣的:(【IOS移动端】)