Monotouch: How do I retrieve fields in a custom cell?
I have a custom cell (with 3 fields) in 开发者_StackOverflow社区a tableview... how do I retrieve the values in each of the fields in the custom cell?
Generally speaking you want to expose the cell fields as properties (ex: FirstNameField). Whether you are using MonoTouch.Dialog or UITableView directly, you can cast the UITableViewCell to whatever derived class you have created. Then you can access the properties of your custom cell.
CustomCell myCell = (CustomCell)vanillaCell;
myCell.FirstNameField = "John";
精彩评论