I'm worried touchesBegan and touchesEnded cannot cause a scroll. I have it doing a NSLog() on touchesbegan and touchesended, and it's doing both correctly. What is important is that the touches are indeed getting passed down correctly to my scroll_view. I know right now that it's checking for 45 degrees, but that's not the important thing. ![]() If(previous_point.x - current_point.x < 0) (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event touch ended") ĬGPoint previous_point = beginning_touch_point ĬGPoint current_point = įloat x_change = fabs(previous_point.x - current_point.x) įloat y_change = fabs(previous_point.y - current_point.y) Here's my code right now: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event touch began") īeginning_touch_point = However, I can't figure out how to pass the touches down. ![]() ![]() If the UIView on top's touches are above 30 degrees, pass it down to the scrollview, and otherwise don't. I'd like to push that up to, say, 30 degrees.Īfter doing some reading, I established the best way to do this would be to put a subclassed UIView on top of the scrollview. As in right now if you move your finger 10 degrees off horizontal, the scrollview will scroll. ![]() Basically I'm trying to make UIScrollView only scroll on higher angles. I overlayed a UIView on the right side to handle touches for scrolling quickly through the list of images.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |