imageview可以设置点击事件吗

2025-03-04 01:22:38
推荐回答(1个)
回答1:

UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom]; btn.frame = CGRectMake(0, 0, 320, 40); [btn addTarget:self action:@selector() forControlEvents:UIControlEventTouchDownRepeat]; [cell addSubview:btn]; 使用以上代码,...