Created
January 16, 2017 17:08
-
-
Save jfversluis/d16f4a745a91b60f4726e8b4b328780c to your computer and use it in GitHub Desktop.
iOS platform specific SwitchEffect
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 EffectsSample.iOS; | |
using UIKit; | |
using Xamarin.Forms; | |
using Xamarin.Forms.Platform.iOS; | |
[assembly: ResolutionGroupName ("MyCompany")] | |
[assembly: ExportEffect (typeof (SwitchEffect), "SwitchEffect")] | |
namespace EffectsSample.iOS | |
{ | |
public class SwitchEffect : PlatformEffect | |
{ | |
protected override void OnAttached () | |
{ | |
(Control as UISwitch).OnTintColor = Color.Red.ToUIColor (); | |
} | |
protected override void OnDetached () | |
{ | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment