UITableView只顯示數組的第二個值...我的錯誤在哪裏?使用數組填充UITableView
public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath) {
UITableViewCell cell = tableView.DequeueReusableCell(cellID);
if (cell == null) {
cell = new UITableViewCell (UITableViewCellStyle.Subtitle, cellID);
}
string firstValue = "Hello"
string secondValue = "Bye"
string[] concat = {firstValue, secondValue};
foreach(string op in concat){
cell.TextView.Text = op;
}
return cell;}
這完全回答這個問題;然而,取決於concat中實際有多少項目,它可能對StringBuilder有更好的性能.Append() – valdetero 2014-09-02 18:23:48