В моей программе есть два вида (scrollView-super, view-sub * 2).
В моем случае два подпредставления просматриваются в scrollView. Событие touchesBegan вызывается в подпредставлениях.
Как я могу получить событие в scrollView ???
@interface MyScrollView:UIScrollView
...
@implement MyScrollView
...
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
//here is my code
//but I can't get event here
...
}
-(id)initWithFrame:(CGRect) frame
{
...
MyView *view1 = [[MyView alloc] initWithFrame:(0, 0, 320, 240);
MyView *view2 = [[Myview alloc] initWithFrame:(0, 240, 320,240);
[self addSubview: view1];
[self addSibvoew: view2];
...
}
@interface MyView:UIView
...
@implement MyScrollView
...
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
//break points
//here comes event
}