1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-06-26 10:36:21 +02:00
bitwarden-mobile/src/iOS.Core/Effects/ScrollEnabledEffect.cs
Federico Maccaroni b8c1107c94
Fixed long secure notes edition scrolling when focused issue (#1257) (#1601)
* Fixed long secure notes edition scrolling when focused issue (#1257)

* Improved fix long secure notes edition scrolling when focused issue to not use a new editor custom renderer but an effect (#1257)

* Fixed long editor, on text and notes on send when scrolling when focused issue (#1257)
2021-10-25 16:28:45 -03:00

26 lines
746 B
C#

using Bit.iOS.Core.Effects;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;
[assembly: ResolutionGroupName("Bitwarden")]
[assembly: ExportEffect(typeof(ScrollEnabledEffect), "ScrollEnabledEffect")]
namespace Bit.iOS.Core.Effects
{
public class ScrollEnabledEffect : PlatformEffect
{
protected override void OnAttached()
{
// this can be for any view that inherits from UIScrollView like UITextView.
if (Element != null && Control is UIScrollView scrollView)
{
scrollView.ScrollEnabled = App.Effects.ScrollEnabledEffect.GetIsScrollEnabled(Element);
}
}
protected override void OnDetached()
{
}
}
}