[RESOLVED] Swipe in from side

Has anyone developed a good way of detecting a swipe in from off screen, like the swipe which pulls down the notifications centre from the top of the screen?

Obviously, the trick is to detect a close-to-edge touch event began phase, but I’m wondering if there is a good threshold for this as simply starting the touch close enough to the edge of the screen will do the same thing (If you’ve played iSlash you know what I mean.)

So, I guess the real question is: How big should the hot zone be for the “swipe in” touch?

Thoughts? [import]uid: 8271 topic_id: 34482 reply_id: 334482[/import]

Well, I think it isn’t doing the same thing but *is* the same thing. You can test this yourself on an iDevice; it seems any drag originating within 2x display.statusBarHeight is enough to call the notifications panel, though the drag seems to need about 1x that height before it registers.

if event.phase == "moved" then if event.yStart \<= display.statusBarHeight \* 2 and event.y - event.yStart \> display.statusBarHeight then -- do something end end [import]uid: 41884 topic_id: 34482 reply_id: 137117[/import]

Well, I think it isn’t doing the same thing but *is* the same thing. You can test this yourself on an iDevice; it seems any drag originating within 2x display.statusBarHeight is enough to call the notifications panel, though the drag seems to need about 1x that height before it registers.

if event.phase == "moved" then if event.yStart \<= display.statusBarHeight \* 2 and event.y - event.yStart \> display.statusBarHeight then -- do something end end [import]uid: 41884 topic_id: 34482 reply_id: 137117[/import]