mercredi 24 juin 2015

How can I set the values of subclassed custom table view cells? In Swift

I would like to set the values of detail labels in the View Controller file using an array with index path.row .

In a previous post: [link][1]

someone helpfully suggested I use

var nib = UINib(nibName: "YourCellSubclass", bundle: nil)
tableView.registerNib(nib, forCellReuseIdentifier: "cell")

however I'm new to using this and came across an error:

Cannot invoke registerNib with an argument list of type 'UINib, forCellReuseIdentifier: 'String'

See more ..

Aucun commentaire:

Enregistrer un commentaire