转自“http://blog.csdn.net/jwzbskywz/article/details/7699661” UIImageView *imageview1 = [[UIImageView alloc] initWithFrame:CGRectMake(125, 50, 229, 229)]; [imageview1 setImage:[UIImage imageWithContentsOfFile:path]]; imageview1.userInteractionEnabled = YES; UITapGestureRecognizer *singleTap1 = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(buttonpress1:)]; [imageview1 addGestureRecognizer:singleTap1]; [singleTap1 release]; [myScrollView addSubview:imageview1]; [imageview1 release];
时间: 2024-10-27 20:17:18