Method didn't work in UIScrollView
hello i put some uitextfield in uiscrollview,and connect the开发者_Python百科m in interface builder to event "touch down" to a method,the problem his that when the uitexttfield is inside uiscrollview the method doesn't called and when the textfield is not in the uiscroll view the method doesn't called.
UIScrollView is special because of all the touch events it needs to process itself. Try sub-classing UIScrollView and add:
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
NSLog(@"you should see this for touch events on your scroll view");
}
set the class name in IB to your UIScrollView subclass.
精彩评论