NewTableCellController() public method

public NewTableCellController ( UITableView tableView, NSIndexPath indexPath ) : TableViewCellController
tableView UITableView
indexPath NSIndexPath
return TableViewCellController
Example #1
0
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            var build = model.Builds.ElementAt(indexPath.Section);

            var buildStatusCellController = cellFactory.NewTableCellController(tableView, indexPath) as BuildStatusTableCellController;

            buildStatusCellController.BindDataToCell(build);
            return(buildStatusCellController.TableViewCell);
        }
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            var committer = committers.ElementAt(indexPath.Row);

            var controller = cellFactory.NewTableCellController(tableView, indexPath) as TopCommittersTableCellController;

            controller.BindDataToCell(committer, committer.Commits / (float)committers.First().Commits);

            return(controller.TableViewCell);
        }
Example #3
0
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            if (indexPath.Section == 0)
            {
                var commit = model.Commits.ElementAt(indexPath.Row);

                var controller = cellFactory.NewTableCellController(tableView, indexPath) as CommitTableCellController;
                controller.BindDataToCell(commit, model.HighlightEmpty);

                return(controller.TableViewCell);
            }
            else
            {
                var buttonController = buttonCellFactory.NewTableCellController(tableView, indexPath) as LatestCommitsLoadMoreTableCellController;
                buttonController.ApplyStyling();
                return(buttonController.TableViewCell);
            }
        }
        public override UITableViewCell GetCell(UITableView tableView, NSIndexPath indexPath)
        {
            var cellController =
                cellFactory.NewTableCellController(tableView, indexPath) as LabelTextInputTableCellController;

            switch (indexPath.Section)
            {
            case 0:
                if (indexPath.Row == 0)
                {
                    cellController.BindDataToCell(string.IsNullOrEmpty(loginModel.Url) ? Login.DefaultSmeedeeUrl : loginModel.Url);

                    cellController.BindActionToReturn((textField) => loginModel.Url = textField.Text);
                    cellController.BindOnEditAction(ResetButton);

                    cellController.TextInput.Placeholder = "url";
                    serverUrl = cellController;
                }
                else
                {
                    cellController.BindDataToCell(string.IsNullOrEmpty(loginModel.Key) ? Login.DefaultSmeedeeKey : loginModel.Key);

                    cellController.BindActionToReturn((textField) => loginModel.Key = textField.Text);
                    cellController.BindOnEditAction(ResetButton);

                    cellController.TextInput.Placeholder = "key";
                    userKey = cellController;
                }
                return(cellController.TableViewCell);

            default:
                buttonCell = new UITableViewCell();
                buttonCell.TextLabel.TextAlignment = UITextAlignment.Center;
                ResetButton();
                return(buttonCell);
            }
        }