iPhone 6/6 Plus: UITableView separator flickering and different thickness

心不动则不痛 提交于 2019-12-18 10:54:17

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!