title: iOS: UIButton draw circle border in iOS
body: <p>I need to draw a circle like border outside UIButton. Below is the attach image and code. I also need to show text below button. Following code will add image and text beneath that. But how do I have layer.<a href="https://i.stack.imgur.com/CY5cO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CY5cO.png" alt="enter image description here"></a></p>
  
  <pre><code>   UIButton *imageButton = [UIButton buttonWithType:UIButtonTypeCustom];
      [imageButton setBackgroundImage:image forState:UIControlStateNormal];
      imageButton.translatesAutoresizingMaskIntoConstraints = NO;
      imageButton.backgroundColor = [UIColor clearColor];
      [imageButton setTitle:title forState:UIControlStateNormal];
      imageButton.titleLabel.textAlignment = NSTextAlignmentCenter;
      imageButton.titleLabel.font = [UIFont fontWithName:@"OpenSans" size:fon];
      [imageButton setTitleEdgeInsets:UIEdgeInsetsMake(95, 0.0f, 0.0f, 0.0f)];
      [imageButton setTitleColor:[UIColor iconTextColor] forState:UIControlStateNormal];
      [imageButton addTarget:target action:action forControlEvents:UIControlEventTouchUpInside];
  </code></pre>