title: How to slicing image and stretchable in iOS
body: <p>I need to stretch image right and left side centre half circle remain as it is. also need half circle in center</p>
  
  <p><a href="https://i.stack.imgur.com/bNxZB.png" rel="noreferrer"><img src="https://i.stack.imgur.com/bNxZB.png" alt="enter image description here"></a></p>
  
  <p>I have tried slicing concept and also tried below code </p>
  
  <pre><code>UIImage *image = self.imgBGBottom.image;
  CGFloat capWidth =  floorf(image.size.width / 2) - 50;
  CGFloat capHeight =  0;
  UIImage *capImage = [image resizableImageWithCapInsets:
                       UIEdgeInsetsMake(capHeight, capWidth, capHeight, capWidth)];
  
  [self.imgBGBottom setImage:capImage];
  </code></pre>
  
  <p>but it is not working for me </p>
  
  <p>Please help me. Thanks in advance.</p>