I want to use touch event methods for UIScrollView. But it was said that I could do this only if I subclass UIScrollView and write these functions inside it. So i did like this
SubClassing.h
@interface ImageTiling : UIScrollView {
}
@end
SubClassing.m
#import "ImageTiling.h"
@implementation ImageTiling
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Touched" message:@"YOOY" delegate:nil cancelButtonTitle:@"YES" otherButtonTitles:nil];
[alert show];
[alert release];
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Ended" message:@"YOOY" delegate:nil cancelButtonTitle:@"YES" otherButtonTitles:nil];
[alert show];
[alert release];
}
@end
But its not having any effect. I have imported that in my main_file.h. What should I do now?