====== SHShakeEvent ====== ---- dataentry extension ---- type : extension # or 'mod' if it requires changing the Sparrow source author_mail : shilo86@gmail.com Shilo White description : A Sparrow 2.x extension for handling shake/motion events. # enter a short description of the extension lastupdate_dt : YYYY-MM-DD # the date you created the extension compatible : v2.X # the Sparrow version you tested the extension with depends : # if the ext. depends on others, list them here tags : motion, shake, event # enter a few tags, separated by commas homepage_url : https://gist.github.com/Shilo/71a2e2e2cb679082f544 # if the ext. has an URL (e.g. a Gist-page), add it here download_url : https://gist.github.com/Shilo/71a2e2e2cb679082f544/download # a direct link to the download (e.g. the Gist-archive) ---- ===== 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 ===== %gist(71a2e2e2cb679082f544)%