-
-
Save jfversluis/d5548e2a5d1c9f0923b1fca8d5f5a918 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using iOSOTPEntrySample; | |
using iOSOTPEntrySample.iOS; | |
using UIKit; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Platform.iOS; | |
[assembly: ExportRenderer(typeof(OtpEntry), typeof(OtpEntryRenderer))] | |
namespace iOSOTPEntrySample.iOS | |
{ | |
public class OtpEntryRenderer : EntryRenderer | |
{ | |
protected override void OnElementChanged(ElementChangedEventArgs<Entry> e) | |
{ | |
base.OnElementChanged(e); | |
if (UIDevice.CurrentDevice.CheckSystemVersion(12, 0) && Control != null) | |
{ | |
Control.TextContentType = UITextContentType.OneTimeCode; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment