开发者

UIButton Design Tools

开发者 https://www.devze.com 2023-04-01 03:40 出处:网络
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.

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 widt开发者_如何转开发h 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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消