Nic Hubbard
Nic Hubbard

Reputation: 42157

iPhone 6 Plus show strange lines in UITableViewCell next to the accessoryView

I have a UITableView that is showing some strange thin grey lines next to the accessory view. This ONLY happens on the plus, no other iPhone shows this issue.

enter image description here

enter image description here

enter image description here

It seems to have something to do with the imageView that is assigned to the cell. Some images cause the line, others don't, seemingly based on their dimensions.

Has anyone else seen this or know how to get rid of it?

Upvotes: 4

Views: 309

Answers (2)

Woody Jean-louis
Woody Jean-louis

Reputation: 535

It looks like that line is from the right edge of the cell's content view. I don't know how it works, but my solution was:

cell.backgroundColor = .clear

Upvotes: 3

Mathew Spolin
Mathew Spolin

Reputation: 371

I experienced this when using a UITableView that was partially covered with an SWRevealViewController.

When the calculated value of the tableview width was a decimal number, artifact lines between the content of a UITableViewCell and the accessory view would appear.

The solution was to make sure that size calculations for the view were rounded to whole numbers.

Upvotes: 3

Related Questions