Last active
June 10, 2019 17:32
-
-
Save Sa1Gur/4331280eae6b944e7c13885c3921e4ca to your computer and use it in GitHub Desktop.
for iOS
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 EntryAccent.iOS.Renderers; | |
using UIKit; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Platform.iOS; | |
[assembly: ExportRenderer(typeof(Entry), typeof(MyEntryRenderer))] | |
namespace EntryAccent.iOS.Renderers | |
{ | |
public class MyEntryRenderer: EntryRenderer | |
{ | |
protected override void OnElementChanged(ElementChangedEventArgs<Entry> e) | |
{ | |
base.OnElementChanged(e); | |
TintCustomization(Control, e.NewElement as MyEntry); | |
} | |
private void TintCustomization(UITextField Control, MyEntry customEntry) | |
{ | |
if (Control == null) return; | |
if (customEntry != null) | |
{ | |
UITextField textField = Control; | |
textField.BorderStyle = UITextBorderStyle.None; | |
textField.TintColor = customEntry.MyHandleColor.ToUIColor(); | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment