private bool remove(SectionedIndex index)
        {
            if (dataSource.SectionContainsOnlyOneRow(index.Section))
            {
                tableView.DeleteSections(indexSet(index.Section), UITableViewRowAnimation.Automatic);
                return(true);
            }

            tableView.DeleteRows(index.ToIndexPaths(), UITableViewRowAnimation.Automatic);
            return(false);
        }
예제 #2
0
        private bool remove(SectionedIndex index)
        {
            var rowIsTheLastOneInTheSection = tableView.NumberOfRowsInSection(index.Section) == 1;

            if (rowIsTheLastOneInTheSection)
            {
                tableView.DeleteSections(indexSet(index.Section), UITableViewRowAnimation.Automatic);
                return(true);
            }

            tableView.DeleteRows(index.ToIndexPaths(), UITableViewRowAnimation.Automatic);
            return(false);
        }