IOS smoothing CAShapeLayer?

I have two rhombus shapes next to each other, and I would like their edges to be easily aligned.

Currently, due to smoothing, the background is leaking, although the edges are as close to each other as possible. I would not want to overlay shapes.

Does anyone have any tips? Thanks

+1
ios calayer antialiasing
source share
1 answer

You should use something like this.

yourLayer.magnificationFilter = kCAFilterNearest; 

You need to import QC first, but you already have it.

EDIT

magnificationFilter Filter used when increasing the size of content.

@property (copy) NSString * magnificationFilter discussion Possible magnificationFilter values ​​are shown in the Scaling Filters section. The default value is kCAFilterLinear.

Availability Available in iOS 2.0 and later. Announced in CALayer.h

+1
source share

All Articles