public void SetDetailItem(CellContent.Info newDetailItem) { if (DetailItem != newDetailItem) { DetailItem = newDetailItem; // Update the view ConfigureView(); } }
void AddNewItem(object sender, EventArgs args) { var num = (animals.Count + 1).ToString(); CellContent.Info item = new CellContent.Info { _id = num, Name = "小美人魚QQ" + num, Variety = "小美人魚" + num }; dataSource.Animal.Insert(0, item); using (var indexPath = NSIndexPath.FromRowSection(0, 0)) TableView.InsertRows(new[] { indexPath }, UITableViewRowAnimation.Automatic); }