diff options
author | adrianknight89 <adrianknight89@outlook.com> | 2017-03-24 14:07:59 -0500 |
---|---|---|
committer | Jason Smith <jason.smith@xamarin.com> | 2017-03-24 12:07:59 -0700 |
commit | 27de335bf1ce9195e7b1de7ec738176da92b3617 (patch) | |
tree | 820c0210f5dd7ac649d2d22e10e42a1b0c00526e /Xamarin.Forms.Core/PlatformConfiguration | |
parent | 377d24fd05e7fb597c4f9237c1596ed4fbf86f19 (diff) | |
download | xamarin-forms-27de335bf1ce9195e7b1de7ec738176da92b3617.tar.gz xamarin-forms-27de335bf1ce9195e7b1de7ec738176da92b3617.tar.bz2 xamarin-forms-27de335bf1ce9195e7b1de7ec738176da92b3617.zip |
[iOS] Platform specifics to control ScrollView content touch delay (#563)
* can delay content touches optionally
* revert bug fix
* add back _tapGesture
* remove extra declaration
Diffstat (limited to 'Xamarin.Forms.Core/PlatformConfiguration')
-rw-r--r-- | Xamarin.Forms.Core/PlatformConfiguration/iOSSpecific/ScrollView.cs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Xamarin.Forms.Core/PlatformConfiguration/iOSSpecific/ScrollView.cs b/Xamarin.Forms.Core/PlatformConfiguration/iOSSpecific/ScrollView.cs new file mode 100644 index 00000000..1a90a1f1 --- /dev/null +++ b/Xamarin.Forms.Core/PlatformConfiguration/iOSSpecific/ScrollView.cs @@ -0,0 +1,30 @@ +namespace Xamarin.Forms.PlatformConfiguration.iOSSpecific +{ + using FormsElement = Forms.ScrollView; + + public static class ScrollView + { + public static readonly BindableProperty ShouldDelayContentTouchesProperty = BindableProperty.Create(nameof(ShouldDelayContentTouches), typeof(bool), typeof(ScrollView), true); + + public static bool GetShouldDelayContentTouches(BindableObject element) + { + return (bool)element.GetValue(ShouldDelayContentTouchesProperty); + } + + public static void SetShouldDelayContentTouches(BindableObject element, bool value) + { + element.SetValue(ShouldDelayContentTouchesProperty, value); + } + + public static bool ShouldDelayContentTouches(this IPlatformElementConfiguration<iOS, FormsElement> config) + { + return GetShouldDelayContentTouches(config.Element); + } + + public static IPlatformElementConfiguration<iOS, FormsElement> SetShouldDelayContentTouches(this IPlatformElementConfiguration<iOS, FormsElement> config, bool value) + { + SetShouldDelayContentTouches(config.Element, value); + return config; + } + } +}
\ No newline at end of file |