How it works...

In steps 1 to 6, we opened an existing project solution. In steps 10 to 13, we added a simple button control to the canvas. After that, we changed the Title and Name properties of the button. In step 17, we added the reference to the library from the iOS project. Again, in step 19, we added a reference to the .NET Standard library from the code level.

In step 21, we added code to trigger the button touch up event. This event triggers when you touch and move up your finger on an actual device, but in the emulator it triggers when you click the button. We added the code inside the ViewDidLoad() method. This method triggers after the View is loaded. In the first two lines of the code, we created an instance of the HelloLib class ...

Get .NET Standard 2.0 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.