Q:

How can I make Custom UIButton with image and text?

As I did on Android under a layout arrange an ImageView and TextView and set ClickListener on Layout so same thing how can I do on swift (3.0) Xcode 8. 
There is no markup like XML. It's difficult to do with drag and drop.
How can I make this view with responsive for all device screens. 
My UI image is below: 

Thanks in advance. 
after using CollectionView it shows like this 

A:

You can use this code to set image and title to button 
let imageSize: CGSize = button.imageView!.image!.size
button.titleEdgeInsets = UIEdgeInsetsMake(26 , -imageSize.width, 0.0, 0.0);
let labelString = NSString(string: button.titleLabel!.text!)
let titleSize = labelString.sizeWithAttributes([NSFontAttributeName: button.titleLabel!.font])
button.imageEdgeInsets = UIEdgeInsetsMake(-15, 0.0, 0.0, -titleSize.width);

