30

After updating to Xcode 13, I face a strange issue, I make a button without title in the storyboard, but it appears with "Button" title in build.

Here's button settings

And here's what it looks like in storyboard

storyboard button

But in build it looks like this

Button with "Button" title

Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
Alex Metelkin
  • 1,520
  • 7
  • 13
  • 1
    Somebody posted a similar topic yesterday. What happens if you have one or more white space letters? – El Tomato Sep 29 '21 at 11:35
  • 1
    @ElTomato nothing changes, but I found a solution later, need to change a style to default – Alex Metelkin Sep 29 '21 at 11:47
  • Interesting... El Tomato wonders if that's a bug? – El Tomato Sep 29 '21 at 11:50
  • Yeah I HATE that one. You have to do the same thing if you want to set different images / titles for the various button states. What annoys me is, in what kind of bizarro world situation is the option literally named 'Default' NOT the default?! – Ash May 26 '23 at 08:25

3 Answers3

94

I found a solution - need to choose Default style.

enter image description here

Alex Metelkin
  • 1,520
  • 7
  • 13
1

If you need to use icon instead of text. Not only button style Default required. You have to check Tint color also because the default is blue.

Button tint

LordGift
  • 51
  • 1
  • 7
-2

If you want to stick to using a Plain button, try entering a thin space (U+2009) character as the title, which won't consume much space and solves the issue. (Thanks to @El Tomato for suggesting white space characters)

Here it is for easier copy-pasting:

Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223