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 | |
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')
-rw-r--r-- | Xamarin.Forms.Core/PlatformConfiguration/iOSSpecific/ScrollView.cs | 30 | ||||
-rw-r--r-- | Xamarin.Forms.Core/Xamarin.Forms.Core.csproj | 1 |
2 files changed, 31 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 diff --git a/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj b/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj index a052352e..1184e012 100644 --- a/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj +++ b/Xamarin.Forms.Core/Xamarin.Forms.Core.csproj @@ -102,6 +102,7 @@ <Compile Include="PlatformConfiguration\iOSSpecific\BlurEffectStyle.cs" /> <Compile Include="PlatformConfiguration\iOSSpecific\Entry.cs" /> <Compile Include="PlatformConfiguration\iOSSpecific\NavigationPage.cs" /> + <Compile Include="PlatformConfiguration\iOSSpecific\ScrollView.cs" /> <Compile Include="PlatformConfiguration\iOSSpecific\Picker.cs" /> <Compile Include="PlatformConfiguration\iOSSpecific\StatusBarTextColorMode.cs" /> <Compile Include="PlatformConfiguration\iOSSpecific\Page.cs" /> |