canab
canab

Reputation: 21

What signature should be used for binding to objective-c parameter of type "Class<...>"?

Objctive-C declaration:

+ (instancetype)queryWithClass:(Class<LYRQueryable>)queryableClass;

How to bind in c# the parameter of type Class<LYRQueryable>? I have binding for LYRQueryable, but how to declare/pass the backended objective-c class for it?

Upvotes: 1

Views: 57

Answers (2)

Rolf Bjarne Kvinge
Rolf Bjarne Kvinge

Reputation: 19345

Use the ObjCRuntime.Class type:

NSObject Query (Class queryableClass);

Upvotes: 0

canab
canab

Reputation: 21

objCClass = new ObjCRuntime.Class(typeof(LYRQueryable));

Upvotes: 1

Related Questions