O'Reilly logo

Mastering Xamarin UI Development - Second Edition by Steven F. Daniel

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating and implementing animations for the SlidingTiles game

In this section, we will look at how easy it is to implement animations in our SlidingTiles game. You'll work with CoreAnimation and the Animate property of the UIView class to handle animations, which will make our game come alive whenever a Game Tile is tapped on the Game Board.

So, let's start by applying the final touches to our SlidingTiles game by modifying the ViewController class, performing the following steps:

  1. Ensure that the ViewController.cs file is currently displayed in the code editor.
  2. Next, locate the TouchesEnded event method and enter the following code snippet:
     #region 7 - Handling touch events in the Game Board public override void TouchesEnded(NSSet touches, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required