我目前有一個表視圖與一列和靜態信息。我想添加第二列,其中包含將從服務器更新的信息。我想添加第二列到我的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,那麼你可以先添加數組。 –
你是什麼意思? –
你想要什麼表? –