One of the cool things about Objective-C is how dynamic it is. This includes the ability to add methods to classes that already exist even at runtime. Categories are a feature of Objective-C that can be used to do all kinds of things that might otherwise be difficult or impossible, but until very recently this feature has been inaccessible from C#. This post will explain what categories are, what they're used for, how to use them in C# using Xamarin.iOS 8.10, and a useful example.
Thursday, April 30, 2015
Sunday, December 7, 2014
Xamarin.iOS Deep Dive Talk Recording
I have sadly neglected this blog a bit during the busy month of Novembruary1, but I wanted to link to a recording of a relevant talk I gave recently on Xamarin.iOS. The talk was given at the Austin Mobile .NET Developers Group's November meeting. Here is the abstract:
This month's talk is a whirlwind tour through how Xamarin marries the worlds of C# and Objective-C. In this talk we will explore the basics of Objective-C and Cocoa Touch and how the Xamarin.iOS runtime and bindings map to C#. You will learn how delegates work, how memory management works, and how to work around missing or incomplete bindings. You will also learn how to use Xamarin Studio to explore Xamarin's code and expand your knowledge on your own.
The presentation runs about 1hr. 20min., but it is full of detailed information. If you are interested in learning more about how Xamarin.iOS works under the hood then I think it is well worth viewing.
Link (embedded recording after the break, along with links to example code from the talk)