用xib拖拽tap gesture recognizer关联到一image view时;
要打开该image的交互属性;
self.******.userInteractionEnabled = YES;
在xib界面把相关imageview拖到tap gesture recognize关联设置的referencing outlet collections
注意:
如果.h文件中
@property (retain, nonatomic) IBOutlet UIImageView *tapedpic;
而.m文件中
没有
@synthesize tapedpic;属性设置
则该image先关需要写成
self.tapedpic.userInteractionEnabled = YES;
- (void)dealloc {
[_tapedpic release];
[super dealloc];
}
如果.m文件中有@synthesize tapedpic;属性设置
则该image先关需要写成
tapedpic.userInteractionEnabled = YES;
- (void)dealloc {
[tapedpic release];
[super dealloc];
}
注意区别!!!