Beispiel #1
0
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            UITableViewCell cell = base.GetCell(tableView, indexPath);

            switch (indexPath.Section)
            {
            case 3:
                CameraSetting cameraSetting = CameraSettingForRow(indexPath.Row);
                if (cameraSetting != null)
                {
                    foreach (UIView subview in cell.ContentView.Subviews)
                    {
                        if (subview.GetType() == typeof(UIPickerView))
                        {
                            UIPickerView pickerView = (UIPickerView)subview;
                            cameraSetting.Attach(pickerView, tableView, NSIndexPath.Create(indexPath.Section, indexPath.Row - 1));
                        }
                    }
                }
                else
                {
                    cameraSetting = CameraSettingForRow(indexPath.Row + 1);
                    if (cameraSetting != null)
                    {
                        cell.DetailTextLabel.Text = cameraSetting.SelectedData();
                    }
                }

                break;
            }

            return(cell);
        }