Reputation: 12981
I m using Xamarin
for iOS and I have a custom View
which inherit from UIView
.
I would like to add a custom delegate
to that view.
So far I found that: Delegate (not useful) example
I want my delegate
to be on his own and won't inherit from any other known delegate
.
Upvotes: 2
Views: 494
Reputation: 43553
There is no delegate
property on UIView
(see Apple docs). It does exists in some subclasses, like UITextView
(and other types).
What you can do (beside using the base classes provided) is:
(with the unified API) create your own classes that implements the IUITextViewDelegate
interface and assign it to the Delegate
property;
Create any class that conforms to the delegate (i.e. minimally all required members), add the required [Export]
, and assign it to the WeakDelegate
property.
Upvotes: 1