开发者

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";
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜