I\'ve implemented a custom table view cell class that inherit from UITableViewCell. The tableview contains a background image, so I want cell\'s background to b
Had a similar problem, had to
add this to the code to correct it
override func tableView(tableView: UITableView, shouldHighlightRowAtIndexPath indexPath: NSIndexPath) -> Bool {
var bgColorView: UIView = UIView()
bgColorView.backgroundColor = UIColor(red: (76.0 / 255.0), green: (161.0 / 255.0), blue: (255.0 / 255.0), alpha: 1.0)
bgColorView.layer.masksToBounds = true
tableView.cellForRowAtIndexPath(indexPath)!.selectedBackgroundView = bgColorView
return true
}