UIButton of type UIButtonTypeCustom will not display Title (iPhone)

后端 未结 5 1696
栀梦
栀梦 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:21

    Image overrides title, you need to make the image a background image to show the title.

    [button setBackgroundImage:[UIImage imageNamed:@"left_halfscreen_button.png"] 
            forState:UIControlStateNormal];
    

提交回复
热议问题