UIImageview 点击事件

 UIImageView *imageView =[[UIImageView alloc]initWithFrame:CGRectMake(100, 100, 200, 200)];

    imageView.image=[UIImageimageNamed:@"filter_laozhaopian_a.png"];

 

    imageView.userInteractionEnabled = YES;

    UITapGestureRecognizer *singleTap = [[UITapGestureRecognizeralloc] initWithTarget:selfaction:@selector(UesrClicked:)];

    [imageView addGestureRecognizer:singleTap];

    [singleTap release];

    

    [self.view addSubview:imageView];

posted @ 2011-11-23 15:05  tinyqf  阅读(7702)  评论(2编辑  收藏  举报