How to put the image on the right side of the text in a UIButton?

 Problem:

I want to set the image on the right side of the button title.How to i achieve that?


Solution:

You can just set the image and title to the button then use the below code to reverse that.

        btn.semanticContentAttribute = .forceRightToLeft


Comments

Popular posts from this blog

Invalid bundle error while upload the app to the app Store

Convert NsNumber, NSDate to String in iOS Swift

Global LocationManager Singleton class iOS Swift