Maybe it's just too early for now but I got a little piece of code I can't follow.
In a UITableViewController is the following
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
{
let cell = printTable.dequeueReusableCellWithIdentifier("printCell", forIndexPath: indexPath) as UITableViewCell
configureTestCell(cell, atIndexPath: indexPath)
return cell;
}
The configureTestCell function:
func configureTestCell(cell: UITableViewCell, atIndexPath indexPath: NSIndexPath)
{
let printCell = cell as PrintCell
if (self.searchActive)
{
printCell.nameLabel.text = "Project \(filteredData[indexPath.item])"
}
else
{
printCell.nameLabel.text = "Project \(printData[indexPath.item])"
}
}
So my problem and question here is, why are the changes made in printCell have an effect on the cell object in the tableView function? Isn't the cell just a copy or am I missing something stupid-easy?