图表上加点击事件

resizedImageView.userInteractionEnabled = YES;
    UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(photoTapped)];
    [resizedImageView addGestureRecognizer:singleTap];//点击图片事件
    NSLog(@"haha");
    [self.view addSubview:resizedImageView];//加载图片
resizedImageView.userInteractionEnabled = YES;
    UITapGestureRecognizer *singleTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(photoTapped)];
    [resizedImageView addGestureRecognizer:singleTap];//点击图片事件
    NSLog(@"haha");
    [self.view addSubview:resizedImageView];//加载图片
//该片段来自于http://outofmemory.cn

发表评论

电子邮件地址不会被公开。 必填项已用*标注

网站地图xml地图