Quantcast
Channel: Recent Threads — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 204402

Binding Obj-C protocols "interface list is not an interface" problem

$
0
0

How do I correctly bind obj-c protocols with multiple types? For example, how do I bind:

@interface MyClass : UIView<UIScrollViewDelegate, UIGestureRecognizerDelegate> {
}

Following this guide: http://docs.xamarin.com/guides/ios/advanced_topics/binding_objective-c/binding_types_reference_guide

[BaseType (typeof (BTYPE))
interface MyType [: Protocol1, Protocol2] {
     IntPtr Constructor (string foo);
}

I have:

[BaseType (typeof (UIView))]
public partial interface MyClass : UIScrollViewDelegate, UIGestureRecognizerDelegate {
}

But I'm getting this error message:

Error CS0527: Type 'MonoTouch.UIKit.UIScrollViewDelegate' in interface list is not an interface (CS0527)
Error CS0527: Type 'MonoTouch.UIKit.UIGestureRecognizerDelegate' in interface list is not an interface (CS0527)

Is it because the delegate classes? What's the correct way to do this?

Thanks.


Viewing all articles
Browse latest Browse all 204402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>