Hi all,
i am having view which has scrollview.i am having UIImage which is subview of scrollview.I am able to zoom also.But when i tap count twice i want to call some other function.
- (BOOL)touchesShouldBegin
NSSet *)touches withEvent
UIEvent *)event inContentView
UIView *)view
{
if(view == scrollView)
{
UITouch *touch = [touches anyObject];
if([touch tapCount]== 2)
{
[self setViewForProductDispaly];
return YES;
}
}
return NO;
}
the above method is not geeting called when i tap it.What might be the reson for this.
my scrollview
scrollView.hidden=NO;
scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0.0, 0.0, self.bounds.size.width,self.bounds.size.height )];
scrollView.maximumZoomScale = 3.0;
scrollView.indicatorStyle = UIScrollViewIndicatorStyleBlack;
scrollView.delegate =self;
scrollView.bouncesZoom = YES;
scrollView.delaysContentTouches=NO;
bigImageView.autoresizesSubviews = YES;
bigImageView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
bigImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0.0, 0.0, bigImg.size.width, bigImg.size.height)];
bigImageView.image = bigImg;
bigImageView.userInteractionEnabled = YES;
[scrollView addSubview:bigImageView];
[bigImageView release];
[self addSubview:scrollView];
[scrollView release];
i am having view which has scrollview.i am having UIImage which is subview of scrollview.I am able to zoom also.But when i tap count twice i want to call some other function.
- (BOOL)touchesShouldBegin
{
if(view == scrollView)
{
UITouch *touch = [touches anyObject];
if([touch tapCount]== 2)
{
[self setViewForProductDispaly];
return YES;
}
}
return NO;
}
the above method is not geeting called when i tap it.What might be the reson for this.
my scrollview
scrollView.hidden=NO;
scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0.0, 0.0, self.bounds.size.width,self.bounds.size.height )];
scrollView.maximumZoomScale = 3.0;
scrollView.indicatorStyle = UIScrollViewIndicatorStyleBlack;
scrollView.delegate =self;
scrollView.bouncesZoom = YES;
scrollView.delaysContentTouches=NO;
bigImageView.autoresizesSubviews = YES;
bigImageView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
bigImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0.0, 0.0, bigImg.size.width, bigImg.size.height)];
bigImageView.image = bigImg;
bigImageView.userInteractionEnabled = YES;
[scrollView addSubview:bigImageView];
[bigImageView release];
[self addSubview:scrollView];
[scrollView release];