Exemplo n.º 1
0
 private Attachment(UITableView tableView, NSIndexPath target, DetailDatePickerCell cell, NSIndexPath path)
 {
     _tableView      = tableView;
     _target         = target;
     _cell           = cell;
     _datePickerPath = path;
 }
Exemplo n.º 2
0
            public static Attachment Attach(UITableView tableView, NSIndexPath toIndexPath, FieldBinding toField, DetailDatePickerCell datePicker)
            {
                if (tableView == null)
                {
                    throw new ArgumentNullException("tableView");
                }
                if (toIndexPath == null)
                {
                    throw new ArgumentNullException("toIndexPath");
                }
                if (toField == null)
                {
                    throw new ArgumentNullException("toField");
                }
                if (datePicker == null)
                {
                    throw new ArgumentNullException("datePicker");
                }

                var datePickerPath = IndexPathForAttachment(toIndexPath);

                tableView.InsertRows(new[] { datePickerPath }, UITableViewRowAnimation.Fade);
                datePicker.Attach(toField);

                return(new Attachment(tableView, toIndexPath, datePicker, datePickerPath));
            }