UIBezierPath Subtract Path
Используя[UIBezierPath bezierPathWithRoundedRect:byRoundingCorners:cornerRadii:]
Я могу создать округлый вид, такой как этот:
Как я мог бы вычесть другой путь из этого (или каким-либо другим способом), чтобы создать путь, подобный этому:
Есть ли способ, которым я могу сделать что-то подобное? псевдокод:
UIBezierPath *bigMaskPath = [UIBezierPath bezierPathWithRoundedRect:bigView.bounds
byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRight)
cornerRadii:CGSizeMake(18, 18)];
UIBezierPath *smallMaskPath = [UIBezierPath bezierPathWithRoundedRect:smalLView.bounds
byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRight)
cornerRadii:CGSizeMake(18, 18)];
UIBezierPath *finalPath = [UIBezierPath pathBySubtractingPath:smallMaskPath fromPath:bigMaskPath];