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

Adding a reset button to our View Controller in the Storyboard

In this section, we will take a look at how we can use Buttons to respond to user actions when they are tapped on in the View Controller. Buttons contain numerous properties that can be set, as well as things called Control Events and Target/Action Events.

Control Events are executed and respond to actions whenever they are tapped. An example would be when you want to change the color of a button when it has been tapped or play some sound. On the other hand, Target/Action Events calls the underlying instance method to perform the action that is associated with that button where the code resides.

Let's start by adding a Button object to our View Controller, performing the following ...

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