title: How to create Box-Shadow in IOS
body: <p>I want to design a login page like this <img src="https://i.stack.imgur.com/kpfFc.png" alt="enter image description here"></p>
  
  <p>in this page using box shadow in ios i tried layer shadow <a href="https://stackoverflow.com/questions/2044479/what-is-the-best-way-to-create-a-shadow-behind-a-uiimageview"> like this</a>
  but this one not showing like above image plz guide. </p>
  
  <p>I tried </p>
  
  <pre><code>imageView.layer.shadowColor = [UIColor purpleColor].CGColor;
  imageView.layer.shadowOffset = CGSizeMake(0, 1);
  imageView.layer.shadowOpacity = 1;
  imageView.layer.shadowRadius = 1.0;
  imageView.clipsToBounds = NO;
  </code></pre>
  
  <p>but it shows</p>
  
  <p><img src="https://i.stack.imgur.com/9GXhd.png" alt="enter image description here"></p>
  
  <p>thanks in advance</p>
  
  <p><strong>update</strong> </p>
  
  <p>using below code:</p>
  
  <pre><code>UIImageView *imag = (UIImageView*)[self.view viewWithTag:1];
      imag = [[UIImageView alloc] initWithFrame:CGRectMake((screenWidth/100)*12, (screenHeight/100)*10, (screenWidth/100)*75, (screenHeight/100)*61)];
      [imag setBackgroundColor:[UIColor whiteColor]];
      [imag.layer setOpacity:0.4];
      [imag.layer setShadowOpacity:1.0];
      [imag.layer setShadowColor:[[UIColor blackColor] CGColor]];
      [imag.layer setShadowOffset:CGSizeMake(0.0, 0.0)];
      [imag.layer setShadowRadius:8.0];
      [imag setClipsToBounds:FALSE];
      [imag.layer setMasksToBounds:FALSE];
      [self.view addSubview:imag];
  </code></pre>
  
  <p>ios 6 it shows like below image but it working on ios 7 </p>
  
  <p><img src="https://i.stack.imgur.com/fsOfe.png" alt="enter image description here"></p>