In my application, I am currently drawing the main view, and then I am trying to round it in corners using CAShapeLayer, but UICollisionBehavior still reacts like a square that is drawn.
Here is an example of my code
UIBezierPath *path = [UIBezierPath bezierPathWithRoundedRect:self.bounds
byRoundingCorners:UIRectCornerAllCorners
cornerRadii:radiiSize];
CAShapeLayer *cornerMaskLayer = [CAShapeLayer layer];
[cornerMaskLayer setPath:path.CGPath];
self.containerView.layer.mask = cornerMaskLayer;
self.containerView.layer.allowsEdgeAntialiasing = YES;
source
share