Hallo liebe Profis,
ich möchte gern in einem TableView Indexe haben, hab mir dazu im Inet auch was gesucht und scheitere nun leider an der
Bitte um Hilfe oder besser Erklärung dazu.
so sieht der bisherige Code aus:
ich möchte gern in einem TableView Indexe haben, hab mir dazu im Inet auch was gesucht und scheitere nun leider an der
override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell
ich muß dort noch den code let contact = sections[indexPath.section][indexPath.row]
einflechten aber bekomme irgendwie kein Ergebnis.Bitte um Hilfe oder besser Erklärung dazu.
so sieht der bisherige Code aus:
C-Quellcode
- override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
- let contact = sections[indexPath.section][indexPath.row]
- let cell = tableView.dequeueReusableCellWithIdentifier("Cell", forIndexPath: indexPath)
- let task = fetchedResultController.objectAtIndexPath(indexPath) as! Auftrag
- cell.textLabel?.text = "\(task.nachname!), \(task.vorname!)"
- cell.detailTextLabel?.text = "\(task.plz!) \(task.stadt!), \(task.strasse!)"
- return cell
- }