0
votes

I have a problem that I can't resolve.

When subclassing the UITableViewCell and fill the array data, I have something like :

enter image description here

This is my class TrackViewCell

import Foundation
import UIKit

class TrackViewCell : UITableViewCell {

    @IBOutlet weak var iconPlayLabel: UILabel!
    @IBOutlet weak var nameTrackLabel: UILabel!

}

and how I use it :

func tableView(tableView: UITableView!, cellForRowAtIndexPath indexPath: NSIndexPath!) -> UITableViewCell! {

var cell = tableView.dequeueReusableCellWithIdentifier("TrackViewCell") as TrackViewCell
let track = self.tracks[indexPath.row]
cell.nameTrackLabel.text = track.title
cell.iconPlayLabel.text = "▶️"
return cell
}

and some others revenants screens : enter image description hereenter image description here

I can also send you the xcode project ( it's not personal, it's a tutorial )

Thanks you in advance all.

1

1 Answers

0
votes

i had the same problem today, turned out that changing the cells height solved it. I guess somehow the content of the cell did not fit into it so it corrupted, at least that's my guess.... So try changing the height of the cell in storyboard / interface builder and see if it works.