iOS - sideways swiping within a vertically scrolling object?
terry.judd at unimelb.edu.au
Sun Aug 19 20:58:29 EDT 2012
On 20/08/2012, at 10:10 AM, Thomas McGrath III wrote:
> I just posted a link to another thread for a very crude example of mixing both horizontal and separate vertical scrolling that may give you some ideas. It is crude but works. also via script a button could scroll left right to exact horizontal scrolling coordinates and then at each 'page' the table could scroll vertical. The popover part may be ignored and instead just focus on the left right and separate vertical scrolling.
> Have a look.
Thanks Tom - that looks good but I don't really want to have separate swipe zones. The behaviour I'm looking for is very much along the lines of that in the Calendar app on the iPhone. Swipe (mostly) vertically and the calendar scrolls up or down, swipe horizontally and it moves back or forwards by day or week.
Turns out that I had the canCancelTouches property of the scroller set to true, so it's no wonder that the touch events weren't being registered. Now that I've got it setup correctly (delayTouches = true, canCancelTouches = false) it seems to behave how I want it to (more or less).
> Thomas J McGrath III
> 3mcgrath at comcast.net
> Lazy River Software
> On Aug 19, 2012, at 2:07 AM, Terry Judd <terry.judd at unimelb.edu.au> wrote:
>> I have a vertically scrolling group (weekly timetable) and I like to be able to navigate backwards and forwards a week by swiping left or right within it. I can do this with a pair of touchstart/end scripts but unless the swipe is very horizontal the object scrolls and no touchstart or end messages are sent.
>> I've tried trapping the scrollerBeginDrag and scrollerEndDrag messages but there doesn't seem to be a reliable way to capture the 'mouse' coordinates within these messages so I can determine whether to count it is a horizontal swipe. The mouseH sometimes gives sensible values within a scrollerBeginDrag message and other times not - it never seems to return a sensible value in the scrollerEndDrag message.
>> Any ideas on a better way of tackling this?
>> Dr Terry Judd
>> Senior Lecturer in Medical Education
>> Medical Eduction Unit
>> Faculty of Medicine, Dentistry & Health Sciences
>> The University of Melbourne
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
Dr Terry Judd
Senior Lecturer in Medical Education
Medical Eduction Unit
Faculty of Medicine, Dentistry & Health Sciences
The University of Melbourne
More information about the Use-livecode