SHShakeEvent

type:
extension
author:
Shilo White
description:
A Sparrow 2.x extension for handling shake/motion events.
compatible:
v2.X
tag:
motion, shake, event
homepage:
https://gist.github.com/Shilo/71a2e2e2cb679082f544
download:
https://gist.github.com/Shilo/71a2e2e2cb679082f544/download

Usage

A Sparrow 2.x extension for handling shake/motion events. Note: The event only bubbles to Sparrow's root display object and stage.

Sample code:

[Sparrow.stage addEventListenerForType:SHEventTypeShake block:^(SHShakeEvent *event)
{
    if (event.phase == SHShakePhaseEnded)
    {
        NSLog(@"did shake");
    }
}];

Changelog

  • 2014/11/21 13:42: First public version

Source Code

  users/shilo/extensions/shshakeevent2.txt · Last modified: 2014/11/21 13:45 by shilo
 
Powered by DokuWiki