UIButton of type UIButtonTypeCustom will not display Title (iPhone)

后端 未结 5 1699
栀梦
栀梦 2020-12-08 09:21

I must have overlooked something completely obvious?? but my button displays its image and size correctly, but I simply can\'t get the Title to show up.

I did a real

5条回答
  •  孤城傲影
    2020-12-08 10:17

    I had a similar problem that the title was not shown. I forgot to set the frame property:

    //set the position of the button
    button.frame = CGRectMake(100, 170, 100, 30);
    

提交回复
热议问题