this is different than what i've found on this website because everything i've found adds multiple cells upon a button push. I don't have a button and i don't see the functionality of adding multiple pieces of information to a single cell.
I made a custom cell for my UITableView and I believe it is working fine.
I have a subclass of UITableView and I only need one cell to be added. Each cell has 5 text fields that I need to add information to.
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier("onlyCell", forIndexPath: indexPath) as! tableCardTableViewCell
cell.field1.text = info1
cell.field2.text = info2
cell.field3.text = info3
cell.field4.text = info4
cell.field5.text = info5
return cell
}
above is how I tried to add the information.
Below is how is how I tried to add the cell to the tableview
myTable.insertRowsAtIndexPaths([NSIndexPath(forRow: 0, inSection: 0)], withRowAnimation: .Automatic)