Pages

Sunday, 27 January 2019

Text Blinking Animation in Xamarin iOS





public partial class ViewController : UIViewController
 {
  protected ViewController(IntPtr handle) : base(handle)
  {
  }
    public override void ViewDidLoad()
  {
   base.ViewDidLoad();

   Timer timer = new Timer();

   timer.Interval = 500;
   timer.Start();
   timer.Elapsed += (object sender, ElapsedEventArgs e) =>
   {
    InvokeOnMainThread(() =>
    {
     if (lblBlink.Text ==””)
      lblBlink.Text=”Xamarin.Android";
     else
      lblBlink.TextColor = “”;
   };
  }

  public override void DidReceiveMemoryWarning()
  {
   base.DidReceiveMemoryWarning();
   // Release any cached data, images, etc that aren't in use.
  }
 }

No comments:

Post a Comment