I am using a custom UITableViewDelegate and in my controller I want to run some code when the tableview has a rowselected. I noticed the UITableViewDelegate already has an event called RowSelected but you cannot use it I'm guessing because there is a method in UITableViewDelegate with the exact same name.
If I write:
mytableviewdelegate.RowSelected += myeventhandler;
This will not compile and gives the error:
"Cannot assign to 'RowSelected' because it is a 'method group'"
Any ideas, I have a work around which is fine so Im really looking at working out if this is a bug in MonoTouch?
How are you implementing the custom UITableViewDelegate? I would suggest using Monotouch's
UITableViewSource
as it combines both theUITableViewDataSource
and theUITableViewDelegate
into one file which makes things so much easier.Some example code:
(in your
UIViewController
that contains theUITableView
)Then you'll want to create a new class for this:
That should help you get started. In the
UITableViewSource
class you can always typepublic override
and MonoDevelop will show you what methods are available to be overriden.