给TTImageView增加click事件

 

直接贴代码

@interface TSSlideShowImageView : TTImageView
{
    NSString* _linkURL;
}
@property(nonatomic,copy)NSString* linkURL;

@end
#import "TSSlideShowImageView.h"

@implementation TSSlideShowImageView
@synthesize linkURL = _linkURL;

-(void)dealloc
{
    [_linkURL release];
    [super dealloc];
}

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
//    UITouch *touch = [touches anyObject];
    TTOpenURL(_linkURL);
}

@end
posted @ 2012-06-21 14:40  alex hu  阅读(543)  评论(0编辑  收藏  举报