There are plenty of threads about aligning a button image according to the title text, but I can\'t find anything about just aligning the image to the right side of the butt
make it as default semantic i.e unspecified or force left to right
and in button.imageEdgeInsets set it as
UIEdgeInsets(top: 0, left: self.view.frame.size.width - (the image size + the alignment space ) , bottom: 0, right: 0)
this will make ensure that no matter what the view size is ,it will always align the image from right side of the button