public void btnAdd_onClick(object sender, EventArgs args)
        {
            DetailViewController detailViewController = (DetailViewController)Storyboard.InstantiateViewController("DetailViewController");

            detailViewController.personList            = listPizza;
            detailViewController.tablePersonController = this;
            NavigationController.PushViewController(detailViewController, true);
        }
Пример #2
0
        //ContextualAction zum Bearbeiten der Person
        public UIContextualAction contextualEditAction(int row, UITableView tableView)
        {
            var action = UIContextualAction.FromContextualActionStyle(UIContextualActionStyle.Normal,
                                                                      "Edit",
                                                                      (UIContextualAction EditItem, UIView view, UIContextualActionCompletionHandler success) =>
            {
                DetailViewController detailViewController  = (DetailViewController)tablePersonController.Storyboard.InstantiateViewController("DetailViewController");
                detailViewController.currentPerson         = listPersons[row];
                detailViewController.personList            = listPersons;
                detailViewController.tablePersonController = tablePersonController;
                tablePersonController.NavigationController.PushViewController(detailViewController, true);
                success(true);
            });

            action.BackgroundColor = UIColor.Orange;
            return(action);
        }