I want to achieve a rather simple effect. A scrollView and a static button above it. So far not problem. Unfortunately a problem occurs if I want to scroll the view "trough" the button. So start dragging inside the button will effect the button, not the scroll view.
Any ideas on how to achieve that?
Thanks a lot!
I think this approach won't work because touchesBegan is deprecated in UIScrollView … (Is this info true?)
Not the solution :-)
@implementation MySuperButton
+ (id)buttonWithFrame:(CGRect)frame {
return [[[self alloc] initWithFrame:frame] autorelease];
}
- (id)initWithFrame:(CGRect)frame {
if (self == [super initWithFrame:frame]) {
NSLog(@"initWithFrame");
}
return self;
}
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
[super touchesBegan:touches withEvent:event];
[self.nextResponder touchesBegan:touches withEvent:event];
NSLog(@"[self nextResponder]: %@", [self nextResponder]);
}
@end
Unfotunately this does not work, yet. I think the next responder is a my UIView not my UIScrollView. Any ideas?
If my viewcontroller which is the nextResponder, passes the touches to the scrollView, nothing happens aswell.