public UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath){ NSString cellIdentifier = (NSString)@"Cell"; UITableViewCell cell = tableView.DequeueReusableCell (cellIdentifier); if (cell == null) { cell = new MMSideDrawerTableViewCell (); cell.SelectionStyle = UITableViewCellSelectionStyle.Blue; } switch (indexPath.Section) { case 2: if (indexPath.Row == 0) { cell.TextLabel.Text = "Quick View Change"; } else { cell.TextLabel.Text = "Full View Change"; } cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; break; case 1: cell.TextLabel.Text = "Show Shadow"; if (MMDrawerController_UIViewController.Mm_drawerController.ShowsShadow) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; case 3: switch (indexPath.Row) { case 0: cell.TextLabel.Text = "Pan Nav Bar"; if (MMDrawerController_UIViewController.Mm_drawerController.OpenDrawerGestureModeMask>0 && MMOpenDrawerGestureMode.PanningNavigationBar > 0) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; case 1: cell.TextLabel.Text = "Pan Center View"; if (MMDrawerController_UIViewController.Mm_drawerController.OpenDrawerGestureModeMask>0 && MMOpenDrawerGestureMode.PanningCenterView > 0) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; case 2: cell.TextLabel.Text = "Bezel Pan Center View"; if (MMDrawerController_UIViewController.Mm_drawerController.OpenDrawerGestureModeMask>0 && MMOpenDrawerGestureMode.BezelPanningCenterView > 0) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; default: break; } break; case 6: switch (indexPath.Row) { case 0: cell.TextLabel.Text = "Pan Nav Bar"; if (MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerGestureModeMask>0 && MMCloseDrawerGestureMode.PanningNavigationBar > 0) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; case 1: cell.TextLabel.Text = "Pan Center View"; if (MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerGestureModeMask>0 && MMCloseDrawerGestureMode.PanningCenterView > 0) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; case 2: cell.TextLabel.Text = "Bezel Pan Center View"; if (MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerGestureModeMask>0 && MMCloseDrawerGestureMode.BezelPanningCenterView > 0) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; case 3: cell.TextLabel.Text = "Tap Nav Bar"; if (MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerGestureModeMask>0 && MMCloseDrawerGestureMode.TapNavigationBar > 0) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; case 4: cell.TextLabel.Text = "Tap Center View"; if (MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerGestureModeMask>0 && MMCloseDrawerGestureMode.TapCenterView > 0) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; case 5: cell.TextLabel.Text = "Pan Drawer View"; if (MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerGestureModeMask>0 && MMCloseDrawerGestureMode.PanningDrawerView > 0) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; default: break; } break; default: break; } return cell; }
public UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath) { NSString cellIdentifier = (NSString)@"Cell"; UITableViewCell cell = tableView.DequeueReusableCell(cellIdentifier); if (cell == null) { cell = new MMSideDrawerTableViewCell(); cell.SelectionStyle = UITableViewCellSelectionStyle.Blue; } switch (indexPath.Section) { case 2: if (indexPath.Row == 0) { cell.TextLabel.Text = "Quick View Change"; } else { cell.TextLabel.Text = "Full View Change"; } cell.Accessory = UITableViewCellAccessory.DisclosureIndicator; break; case 1: cell.TextLabel.Text = "Show Shadow"; if (MMDrawerController_UIViewController.Mm_drawerController.ShowsShadow) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; case 3: switch (indexPath.Row) { case 0: cell.TextLabel.Text = "Pan Nav Bar"; if (MMDrawerController_UIViewController.Mm_drawerController.OpenDrawerGestureModeMask > 0 && MMOpenDrawerGestureMode.PanningNavigationBar > 0) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; case 1: cell.TextLabel.Text = "Pan Center View"; if (MMDrawerController_UIViewController.Mm_drawerController.OpenDrawerGestureModeMask > 0 && MMOpenDrawerGestureMode.PanningCenterView > 0) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; case 2: cell.TextLabel.Text = "Bezel Pan Center View"; if (MMDrawerController_UIViewController.Mm_drawerController.OpenDrawerGestureModeMask > 0 && MMOpenDrawerGestureMode.BezelPanningCenterView > 0) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; default: break; } break; case 6: switch (indexPath.Row) { case 0: cell.TextLabel.Text = "Pan Nav Bar"; if (MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerGestureModeMask > 0 && MMCloseDrawerGestureMode.PanningNavigationBar > 0) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; case 1: cell.TextLabel.Text = "Pan Center View"; if (MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerGestureModeMask > 0 && MMCloseDrawerGestureMode.PanningCenterView > 0) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; case 2: cell.TextLabel.Text = "Bezel Pan Center View"; if (MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerGestureModeMask > 0 && MMCloseDrawerGestureMode.BezelPanningCenterView > 0) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; case 3: cell.TextLabel.Text = "Tap Nav Bar"; if (MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerGestureModeMask > 0 && MMCloseDrawerGestureMode.TapNavigationBar > 0) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; case 4: cell.TextLabel.Text = "Tap Center View"; if (MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerGestureModeMask > 0 && MMCloseDrawerGestureMode.TapCenterView > 0) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; case 5: cell.TextLabel.Text = "Pan Drawer View"; if (MMDrawerController_UIViewController.Mm_drawerController.CloseDrawerGestureModeMask > 0 && MMCloseDrawerGestureMode.PanningDrawerView > 0) { cell.Accessory = UITableViewCellAccessory.Checkmark; } else { cell.Accessory = UITableViewCellAccessory.None; } break; default: break; } break; default: break; } return(cell); }