Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
users:shilo:extensions:shshakeevent2 [2014/11/21 13:44] – created shilousers:shilo:extensions:shshakeevent2 [2014/11/21 13:45] (current) – [Usage] shilo
Line 1: Line 1:
 +====== 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:
 +<code objc>
 +[Sparrow.stage addEventListenerForType:SHEventTypeShake block:^(SHShakeEvent *event)
 +{
 +    if (event.phase == SHShakePhaseEnded)
 +    {
 +        NSLog(@"did shake");
 +    }
 +}];
 +</code>
 +
 +===== Changelog =====
 +
 +  * //2014/11/21 13:42//: First public version
 +
 +===== Source Code =====
 +
 +%gist(71a2e2e2cb679082f544)%
  
  users/shilo/extensions/shshakeevent2.txt · Last modified: 2014/11/21 13:45 by shilo
 
Powered by DokuWiki