UIButton with two lines of text in the title (numberOfLines=2)

后端 未结 6 1901
面向向阳花
面向向阳花 2021-01-30 15:42

I\'m trying to make a UIButton that has two lines of text in its titleLabel. This is the code I\'m using:

    UIButton *titleButton = [[UIButton all         


        
6条回答
  •  生来不讨喜
    2021-01-30 16:06

    You can modify the needed value directly from Storyboard. Select the button, go to the identity inspector and add the following key-value pair in the "User defined runtime attributes" section:

提交回复
热议问题