Circular button in UITableViewCell
<p>I would like to create a circular button in an <code>UITableViewCell</code>.
I am using <code>autolayout</code> constraints in IB. </p>

<p>Generally, I set the corner radius in <code>viewDidLayoutSubviews</code> to keep the buttons circular despite the <code>autolayout</code>.</p>

<p>I have not found how to do that in an <code>UITableViewCell</code>. My buttons are diamond shape instead of oval ! :-(</p>

<p>Thanks !</p>

<p>here is how I make a button circular :</p>

<pre><code>extension UIButton {
   func setCircular() {
      layer.cornerRadius = layer.frame.width / 2
   }
}
</code></pre>

<p>I do that in </p>

<pre><code>override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell
    let cell = tableView.dequeueReusableCellWithIdentifier("cell", forIndexPath: indexPath) as! MyCellClass
    cell.goodButton.setCircular()
}
</code></pre>