0

I draw image with Bezier Path as follow:

CAShapeLayer *shapeLayer = [CAShapeLayer layer];
    shapeLayer.path = bezierPath.CGPath;
    shapeLayer.borderColor = [UIColor yellowColor].CGColor;
    shapeLayer.borderWidth = 2;
    [_round1.layer setMask:shapeLayer];

Problem

I can not able to see border with that image.

I already tried this code but with this shape is weird & image is also not set.

Thank you,

Community
  • 1
  • 1
user2526811
  • 1,233
  • 4
  • 20
  • 54
  • You need two shape layers, one for the mask (without any border) and one that is added as a sublayer with the border. e.g. http://stackoverflow.com/a/24770675/1271826 or http://stackoverflow.com/a/22473181/1271826 or http://stackoverflow.com/a/22473181/1271826. – Rob Jul 28 '16 at 05:52
  • @Rob, Thanks a lot for your answer! It works!!! Can you post as an answer so I accept it? – user2526811 Jul 28 '16 at 06:03
  • Really this question is just a duplicate with a very different name, rob shows you 3 duplicates already – Wain Jul 28 '16 at 06:34

0 Answers0