我目前有一个表视图与一列和静态信息。我想添加第二列,其中包含将从服务器更新的信息。我想添加第二列到我的uitableview。怎么样?
这是现在我的代码:
var array = ["Daskalakis Athletic Center" , "Hagerty Library", "Hans Dining Hall", "Northside Dining Hall", "Urban Eatery", "Creese Student Center", "Cyber Learning Center", "Rush Advisors"]
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int
{
return array.count
}
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
{
let cell: UITableViewCell! = self.ListView
.dequeueReusableCellWithIdentifier("cell") as UITableViewCell!
cell.textLabel!.text = self.array[indexPath.row]
return cell
}
首先清除你的问题兄弟。如果你在你的表中添加coloum,那么你可以先添加数组。 –
你是什么意思? –
你想要什么表? –