The background of UITableView
is set to green and the color of UITableViewCell
is purple and the separators is in black color. I can't figure out where these white lines are coming from? When I scroll up the separators glitch on and off and the white lines stay as it is (where they are). Since I have no idea what's causing this, don't know which code to post save the whole lot of it...Is this from bad code or the simulator being buggy? Scaling up and down doesn't do anything and changing the separators and table footer is moot. If you could help point me in the right direction I would be eternally thankful!
func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCellWithIdentifier( NSStringFromClass(GameTableViewCell), forIndexPath: indexPath) as! GameTableViewCell
cell.game = gameList[indexPath.row]
cell.selectionStyle = .None
print("Row = \(indexPath.row)")
return cell
}
To figure out issues like this, always use the UI debugger. Run the project with a simulator/device, and in Xcode's bottom panel, choose the button highlighted below:
The debugger will allow you to visually inspect all the layers of your UI and where each UI element is coming from (along with memory addresses, sizes etc.)
Below is an example where I have dragged to rotate and inspect the Z-indexes of the view:
Hope this helps.