There are plenty examples in the wild on how to bind instance methods in objc category, but I have yet to find how would one bind class method. For example if I have this category:
@interface UIColor (Awesome)
+ (UIColor *)colorFromHex:(NSString *)hex;
@end
And if I try to bind it like this:
[Category, BaseType(typeof(UIColor))]
interface UIColor_Awesome
{
[Static, Export ("colorFromHex:")]
UIColor ColorFromHex(string hex);
}
I'll get this method after Xamarin's code generation magic happens:
public static UIColor ColorFromHex (this UIColor This, string hex)
And I have no idea what to do with first arg - I don't have an instance to call this method on. How should I correctly write APIDefinition for this situation or how should I use generated method?
Thank you