问题
I've got a UITableView
with separator set to Single Line.
On iPhones <= 5s everything looks fine, but on 6 and 6 Plus (device as well as simulator) the separators have a different thickness. It's even worse as they're flickering while scrolling which looks pretty bad. I don't set the height manually, so I have no idea what's causing this.
As you can see, the first two lines are a little bit thicker than the next two. Now if I scroll, they change from thick to thin and back, so it looks like flickering...
回答1:
The problem is that your app doesn't support native resolution for the iPhone 6 and iPhone 6 Plus. Therefore it gets scaled up which results in the flickering.
You can enable native resolution by adding iOS8 launch images. Then your app will run in the right resolution and this problem will be fixed.
回答2:
Add
Renders with edge antialiasing: YES
In you .plist file
回答3:
Aqua is right, the thickness and flickering problems go away if you add iOS8 launch images.
But you don't need to make actual launch images if you are using storyboards. In Xcode, select your overall project and your app target, then under the General tab find App Icons and Launch Images, then in the Launch Screen File popup, just select your storyboard and the thickness/flickering problems go away.
来源:https://stackoverflow.com/questions/26502773/iphone-6-6-plus-uitableview-separator-flickering-and-different-thickness