How to remove image and write text in a UIButton in Swift?

Your code is right. But you have specify the title color as default color is white due to which you are not able to see text.


@IBAction func btnTapped(sender: AnyObject) {
        btn.setImage(nil, forState: .Normal)
        btn.setTitle("Done", forState: .Normal)
        btn.setTitleColor(UIColor.redColor(), forState: .Normal)

    }

Your code is correct. So I suspect you are having the same issue mentioned here. For fixing it you need to set the title color of that button, by default the title color is white and that's why you are not seeing the text:

workExpExpand.setTitleColor(UIColor.blackColor(), forState: UIControlState.Normal)