Swift - UIButton with two lines of text

前端 未结 10 1661
离开以前
离开以前 2020-11-30 23:38

I was wondering if it is possible to create a UIButton with two lines of text. I need each line to have a different font size. The first line will be 17 point and the seco

10条回答
  •  时光取名叫无心
    2020-12-01 00:21

    I have notice an issue in most of the solutions which is while making line break mode to "Character Wrap" the second line will be left aligned to the first line

    To make all the lines centered. just change the title From Plain to Attributed and then you can make each line centered

提交回复
热议问题