How to get Shadow on UIView as from Top side Only ? [ Objective-c ]
<p>I  want shadow on <code>UIView</code> From Top side only as shown in image below.</p>

<p>I am trying this code to  apply shadow , but shadow is applied on right side of view but i want it from top side.</p>

<pre><code>UIEdgeInsets contentInsets = UIEdgeInsetsMake(10, 0, 0, 0);
CGRect shadowPath = UIEdgeInsetsInsetRect(self.dealMainContentView.bounds, contentInsets);
self.dealMainContentView.layer.shadowPath = [UIBezierPath bezierPathWithRect:shadowPath].CGPath;
self.dealMainContentView.layer.shadowColor = [[UIColor blackColor] CGColor];
self.dealMainContentView.layer.shadowOffset = CGSizeMake(0.0f,0.0f);
self.dealMainContentView.layer.shadowOpacity = 0.4f;
self.dealMainContentView.layer.masksToBounds=NO;
</code></pre>

<p>This how it should look like </p>

<p><a href="https://i.stack.imgur.com/SMA9D.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SMA9D.png" alt="enter image description here"></a></p>