#import <UIKit/UIKit.h>
@interface untitled : UIImageView {
}
@end
#import "untitled.h"
@implementation untitled
- (id)initWithFrame

CGRect)frame
{
if ((self = [super initWithFrame

rame]))
{
// Initialization code
self.userInteractionEnabled=YES;
}
return self;
}
-(void)touchesBegan

NSSet
*)touches withEvent

UIEvent
*)event
{
}
-(void)touchesMoved

NSSet
*)touches withEvent

UIEvent
*)event
{
}
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
}
- (void)dealloc {
[super dealloc];
}
@end
在touch事件种添加你自己想要的操作就可以了
然后定义自己的image就用untitled就可以了