Q:

How to add a circle shaped button with swift?

I am trying to make this simple UI
Now the orange and darkblue are simple two views (the darkblue will have a nested tableview), but how would i make the button with some simple animation? Should i use CALayer or can i make use of the Interface Builder?

A:

I would have done it through code:
    let button2 = UIButton()
    button2.frame = CGRectMake(0, 0, 100, 100)
    button2.layer.borderColor = UIColor.whiteColor().CGColor
    button2.layer.borderWidth = 2
    button2.layer.cornerRadius = 50
    button2.setTitle("button", forState: .Normal)
    button2.backgroundColor = UIColor.blueColor()
    button2.addTarget(self, action: "buttonAction", forControlEvents: .TouchUpInside)
    button2.setTitleColor(UIColor(red: 233/255, green: 64/255, blue: 87/255, alpha: 1), forState: UIControlState.Normal)

self.view.addSubview(button1)

