Below is a simple code patch I use to create a custom button, am new at this. I noticed the text does not appear and am wondering what the proper method is for making the text appear?
func makeButton (vControl: ViewController, action: Selector) {
let myButtonImage = UIImage(named: "Picture1.png")
let imageScale = myButtonImage!.size.width / myButtonImage!.size.height
let wwidth = vControl.self.view.bounds.width
let button = CreateButton(frame: CGRect(x: 100, y: 100, width: (myButtonImage?.size.width)!/3, height: (myButtonImage?.size.height)!/3))
button.setImage(myButtonImage, for: .normal)
button.backgroundColor = .clear
button.setTitleColor(.black, for: .normal)
button.setTitle("Test Button", for: .normal)
button.addTarget(vControl, action: action, for: .touchUpInside)
vControl.view.addSubview(button)
button.center = vControl.view.center
}