次のように、ビューレイヤーにシャドウを追加しています。
self.view.layer.shadowOffset = CGSizeZero;
self.view.layer.shadowOpacity = 0.10f;
self.view.layer.shadowRadius = 5.0f;
self.view.layer.shadowColor = [UIColor blackColor].CGColor;
self.view.layer.shadowPath = [UIBezierPath bezierPathWithRect:
CGRectMake(self.view.bounds.origin.x, self.view.bounds.origin.y, self.view.bounds.size.width - 5.0, self.view.bounds.size.height)].CGPath;
self.view.clipsToBounds = NO;
私がやりたいのは、シャドウが幅を超えないように、しかし高さを超えないように、どういうわけかクリップすることです。基本的に、境界全体の影ではなく、90度の影が必要です。bezierRectの幅からshadowRadiusの量を差し引いてみましたが、これにより、下部のシャドウフローが少し混乱します。
これをどのように達成できるかについてのアイデアはありますか?