title: How to create a custom button and use multiple times in best way in iOS?
body: <p>I have created a custom <code>UIButton</code> in ios. I want to use the same custom button ten times with the same attributes but different titles. What is the most efficient and clever way to do this without repeating the same code for each button? Should it be a struct or a class or something else? How can I implement it? Attributes that I have changed for my custom button is as follows:</p>
  
  <pre><code> @IBOutlet weak var button_1: UIButton!
  
   button_1.frame = CGRectMake(0.0, 0.0, button_1.frame.width, button_1.frame.height)
   button_1.clipsToBounds = true
   button_1.layer.cornerRadius = button_1.frame.width/2.0
   button_1.layer.borderColor = UIColor.whiteColor().CGColor
   button_1.layer.borderWidth=2.0
  </code></pre>