I need to create button programatically with an image for normal and highlighted state as well text. I cannot build it using Interface Builder, because I need to create butt
UIButtons setImage sets the image above the title so you will not be able to see the text below it. So try to set image to your button with setBackgroundImage.
Objective-C:
[btn setBackgroundImage:buttonImage forState:UIControlStateNormal];
Swift:
myButton.setBackgroundImage(buttonImage, forState: .normal)