0

I want to design a UIButton in a specific way and cannot find in the Interface Builder all the relevant tools required for the design.

The tools I cannot find:

  • Text Alignment: I want to have the text aligned to the middle (it is available for UILabel, but I don't see this option in UIButton).
  • Button Edges: I want to use Type >> Custom so I can have control over the button color and opacity; still, I wish to have rounded edges (like the Type >> Rounded Rect has). How can I do that?
  • Edges Style/Design: If/Once I have these rounded edges for the button, I wish to set the width of the edges and its color (to have this nice frame). Is it possible?

If I can do it via Interface Builder, I prefer that; I don't mind setting these attributes via code as well...

Any assistance would be very much appreciated.

EmptyStack
  • 51,274
  • 23
  • 147
  • 178
Ohad Regev
  • 5,641
  • 12
  • 60
  • 84
  • You couldn't set that properties via Interface Builder. You set them in code. – Nekto Aug 31 '11 at 09:09
  • Here's a good way to do that http://stackoverflow.com/questions/12301256/is-it-possible-to-set-uiview-border-properties-from-interface-builder – user1485365 Apr 01 '14 at 09:48

1 Answers1

2

For that level of customizability you'll have to make a custom button and either draw it in code or use images. Things like corner radius and edge style are not customizable in interface builder.

mjisrawi
  • 7,846
  • 3
  • 24
  • 27