In my UIView i added UIScrollview as subview and in UIScrollview i added UIButtons.
Now my problem is that i want to know whether user click on button or not but touchesbegin of UIScrollview is not called where as all other delegate methods of scrollview working perfect.
Please let me know if i m doing something wrong.
In my UIView i added UIScrollview as subview and in UIScrollview i added UIButtons.
Share
If you’re just trying to handle simple taps on the button I suggest you use – (void)addTarget:(id)target action:(SEL)action forControlEvents:(UIControlEvents)controlEvents (for more info on it look into UIControl) of the UIButton, otherwise my way would be to subclass the UIScrollView, add a delegate for touches and pass them on to it, but it’s messy and I wouldn’t use this unless extremely custom behavior is needed