Question

I'm using a view based NSTableView which displays a NSTableRowView containing an NSImageView and some NSTextFields. The NSTextFields are having the backgroundColor property set and are drawing correctly. I've tried to draw them with rounded corners by setting

[textfield.layer setWantsLayer: YES];
[textfield.layer setCornerRadius: 5.];

What is working but causes the views with the applied corner radius to flicker while scrolling the table view. Setting the view's layer via textfield.layer [setLayer: [CALayer layer]] or forcing the layer to rasterize by setting [textfield.layer setShouldRasterize: YES] also did not work. Any suggestions how to get rid of the nasty flickering? I'm developing on Mavericks for Mavericks using Xcode 5.

Était-ce utile?

La solution

With the help of uchuugaka's post I was able to fix it using this tutorial: Tutorial

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top