title: iOS : How to add drop shadow and stroke shadow on UIView?
body: <p>I want to add <strong>drop shadow</strong> and <strong>stroke shadow</strong> on <code>UIView</code>
  This is what my designer given me to apply shadow,</p>
  
  <ul>
  <li><p>For drop shadow, he told me to use RGB(176,199,226) with 90% opacity, distance-3 and size-5</p></li>
  <li><p>For stroke shadow, he told to apply, RGB(209,217,226) of size-1 and 100% opacity.</p></li>
  </ul>
  
  <p>This is photoshop applied effects screen,</p>
  
  <p><img src="https://i.stack.imgur.com/OHILX.png" alt="enter image description here"><img src="https://i.stack.imgur.com/nLjsP.png" alt="enter image description here"></p>
  
  <p><strong>The view with the required shadow (expected output)</strong></p>
  
  <p><img src="https://i.stack.imgur.com/E9KfR.png" alt="enter image description here"></p>
  
  <p><strong>I tried the following to get the drop shadow</strong></p>
  
  <pre><code>viewCheck.layer.masksToBounds = NO;
  viewCheck.layer.cornerRadius = 5.f;
  viewCheck.layer.shadowOffset = CGSizeMake(.0f,2.5f);
  viewCheck.layer.shadowRadius = 1.5f;
  viewCheck.layer.shadowOpacity = .9f;
  viewCheck.layer.shadowColor = [UIColor colorWithRed:176.f/255.f green:199.f/255.f blue:226.f/255.f alpha:1.f].CGColor;
  viewCheck.layer.shadowPath = [UIBezierPath bezierPathWithRect:viewCheck.bounds].CGPath;
  </code></pre>
  
  <p>And this is the result of it,</p>
  
  <p><img src="https://i.stack.imgur.com/RMnVd.png" alt="enter image description here"></p>
  
  <p>I'm having problem in understanding how I can apply stroke and drop shadow as showing into photoshop screenshots (I've added above). How to apply Distance, Spread, Size, Position?</p>
  
  <p>Can someone point me to a guide to applying these kind of shadows? There's lots of shadow effects coming out and I want to learn how it can be possible instead asking each of the questions here! </p>
  
  <p>Thanks :)</p>