左右相反:

            button.transform = CGAffineTransformMakeScale(-1.0, 1.0)

            button.titleLabel?.transform = CGAffineTransformMakeScale(-1.0, 1.0)

            button.imageView?.transform = CGAffineTransformMakeScale(-1.0, 1.0)

 

圖片縮放模式            

            button.imageView?.contentMode = .ScaleAspectFill

 

參考資料 :

http://stackoverflow.com/questions/7100976/how-do-i-put-the-image-on-the-right-side-of-the-text-in-a-uibutton

http://blog.csdn.net/vitoaaazzz/article/details/23040121

arrow
arrow
    全站熱搜

    小賢 發表在 痞客邦 留言(0) 人氣()