rounded ios button

Swift
   button.layer.cornerRadius = button.frame.size.height / 2
// must be in the viewDidLoad func
      buttonRound.layer.cornerRadius = buttonRound.frame.size.height / 2
Source

Also in Swift: