![]() If you have moved your finger significantly within 150ms, it starts scrolling (and never passes the event to the inner view). ![]() If you haven't moved your finger significantly within 150ms, it passes the event on to the inner view. To decide if the touch is to be handled or to be forwarded, UIScrollView starts a timer when you first touch it: Then inside touchesBegan, touchesMoved etc it checks if it's interested in the event, and either handles or passes it on to the inner components. It overrides hitTest method and always returns itself, so that all touch events go into UIScrollView. To accomplish that, you must know how UIScrollView works internally. So the strategy is to let the outer scroll view only handle horizontal scrolling, and inner scroll views to only handle vertical scrolling. However I have not tried hard enough personally, and my practise shows that when you do try hard enough, you can make UIScrollView do anything you want. ![]() Frankly, I'm yet to see a person who has got this to work. I don't know which one will work / is easier to implement, so try both.įirst: nested UIScrollViews. Note that you need to use a UIScrollView with pagingEnabled=YES to switch between pages, but you need pagingEnabled=NO to scroll vertically. You're in a very tough situation, I must say. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |