Permalink
Browse files

Added bounces property - new haxelib version

  • Loading branch information...
1 parent 9de3d23 commit ea85606a5021a492abb5187a7a8e807ad74dd1b9 @waneck committed Sep 6, 2012
View
@@ -96,6 +96,15 @@ class Croxit
return _call_js(js);
}
+ /**
+ * For mobile devices, sets if the scroll should bounce
+ **/
+ public static function setBounces(val:Bool):Void
+ {
+ _set_bounces(val);
+ }
+
+ private static var _set_bounces = Loader.load("ngap_set_bounces", 1);
private static var _show = Loader.load("ngap_show", 0);
private static var _hide = Loader.load("ngap_hide", 0);
private static var _init = Loader.load("ngap_init", 0);
View
@@ -8,6 +8,6 @@
<tag v="neko"/>
<tag v="hxcpp"/>
<description>Croxit is a library that enables Haxe-written HTML5/JS applications to run on a cross-platform, offline environment. It emulates the neko.Web API and allows client/server-style applications to run offline on a mobile or desktop device.</description>
- <version name="0.0.3">Added support for using js->server connection on neko servers as well.</version>
+ <version name="0.0.4">'Bounces' property.</version>
<depends name="hsl-pico-1"/>
</project>
@@ -1075,6 +1075,25 @@ value ngap_call_js(value s)
DEFINE_PRIM(ngap_call_js, 1);
+ value ngap_set_bounces(value boolv)
+ {
+ val_check(boolv, bool);
+ BOOL v = val_bool(boolv);
+
+ for (id subview in web_view_controller.webview.subviews)
+ if ([[subview class] isSubclassOfClass: [UIScrollView class]])
+ ((UIScrollView *)subview).bounces = v;
+
+ if ([web_view_controller.webview respondsToSelector:@selector(scrollView)])
+ {
+ ((UIScrollView *) [web_view_controller.webview scrollView]).bounces = v;
+ }
+
+ return val_null;
+ }
+
+ DEFINE_PRIM(ngap_set_bounces, 1);
+
//void ngap_cache_module
};
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit ea85606

Please sign in to comment.