Ios UIScrollView cannot respond to the TouchesBegin: Event Solution
1: @ Property MyScrollView * scrollView;
2: Add category: MyScrollView + Touch to MyScrollView
3: implement the following three methods in the category:
@ Implementation MyScrollView (Touch)
-(Void) touchesBegan :( NSSet *) touches withEvent :( UIEvent *) event {
[[Self nextResponder] touchesBegan: touches withEvent: event];
[Super touchesBegan: touches withEvent: event];
}
-(Void) touchesMoved :( NSSet *) touches withEvent :( UIEvent *) event {
[[Self nextResponder] touchesMoved: touches withEvent: event];
[Super touchesMoved: touches withEvent: event];
}
-(Void) touchesEnded :( NSSet *) touches withEvent :( UIEvent *) event {
[[Self nextResponder] touchesEnded: touches withEvent: event];
[Super touchesEnded: touches withEvent: event];
}
@ End
4:-(void) touchesBegan :( NSSet *) touches withEvent :( UIEvent *) event {
[Self hiddenkeyBoard];
}