I am able to set the image and text for button. But it is aligned horizontally. I want the image and text to be aligned vertically inside the button. i.e., text below the image<
Yes you can do it from storyboard without writing any logic also.
1) Select button and go to Attribute Inspector
in your storyboard.
2) Assign Image to the button. (Don't use background Image)
3) Set Title text to that button.
4) Now you need to set edge
and Inset
so first select image from edge and set Inset as you need and then select title from edge and set inset as per your need.
Hope this helps.