This is my first question, I apologize if it is not the best.
I am brand new to using Xamarin and iOS development. I have a custom implementation of DialogViewController so that I can override certain methods on UITableViewController. For the sake of the question, it is a very basic implementation.
public class CustomDialogViewController : DialogViewController
{
public CustomDialogViewController(RootElement root)
: base (root)
{ }
public override NSIndexPath WillSelectRow(UITableView tableView, NSIndexPath indexPath)
{
return base.WillSelectRow(tableView, indexPath);
}
public override NSIndexPath WillDeselectRow(UITableView tableView, NSIndexPath indexPath)
{
return base.WillDeselectRow(tableView, indexPath);
}
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
{
base.RowSelected(tableView, indexPath);
}
}
I create my instance like this:
var rootElement = new RootElement("Main");
_mainSection = new Section();
rootElement.Add(_mainSection);
dvcProductGroupList = new CustomDialogViewController(rootElement);
dvcProductGroupList.Style = UITableViewStyle.Plain;
dvcProductGroupList.TableView.Frame = new RectangleF(...);
dvcProductGroupList.View.AutoresizingMask = UIViewAutoresizing.FlexibleWidth;
dvcProductGroupList.OnSelection += dvcProductGroupList_OnSelection;
The DialogViewController is then added to the view. I put breakpoints at the start of each of those overrides but they are never hit. At the point of creation there are no elements but when the view loads it populates the dialog view controller with some data, 4 string elements. I would really appreciate any assistance in trying to get more control over row selection using MonoTouch Dialog. I am trying to get the effect of canceling a row change so that it doesn't select another row when clicked and I think those are the correct methods, I just don't understand why they are never getting hit and I feel like it's a really simple problem.
Thanks.