UIImageView响应点击事件
给View添加点击事件
UIView *view = [[UIControl alloc]init]; view.backgroundColor = [UIColor redColor]; [(UIControl *)view addTarget:self action:@selector(touchpicture:) forControlEvents:UIControlEventTouchUpInside]; [view setFrame:CGRectMake(0, 0, 320, 480)]; [self.view addSubview:view];
关于一些点击事件
时间: 2024-12-16 05:04:54