Reputation: 453
I have a problem that I can't resolve.
When subclassing the UITableViewCell and fill the array data, I have something like :
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 :
I can also send you the xcode project ( it's not personal, it's a tutorial )
Thanks you in advance all.
Upvotes: 0
Views: 74
Reputation: 1
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.
Upvotes: 0