Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode 5 Round Rect Buttons

I have an app that incorporates many round rect buttons. However, in xcode 5, those dont exist. How do I get the round rect buttons back? They are essential to my app. Now it just is pressable text. What do I do? I am planning on releasing this app later, if that is relevant.

like image 362
user2779450 Avatar asked Sep 23 '13 20:09

user2779450


People also ask

How do you make round edged buttons?

Is there an easy way to achieve this in Android? Yes, today there is, and it is very simple. Just use the MaterialButton in the Material Components library with the app:cornerRadius attribute. It is enough to obtain a Button with rounded corners.

How do I make a round button in Swift 4?

Set an aspect ratio constraint (width == height) so that your button is square. Then move the code button. layer. cornerRadius = ... to an override of viewDidLayoutSubviews .


1 Answers

  1. Open the storyboard and choose the button you want to change.
  2. Open the Identity Inspector in the Utility Panel (right panel, 3rd button on top).
  3. Add (+) a new User Defined Runtime Attribute -- Key Path: layer.cornerRadius, Type: Number, Value: {integer}.

The higher the number, the more rounded the corners. 50 is a circle for a standard button (or width/2). You won't see the change in the storyboard, but it will show at runtime.

Screenshot of added attribute

like image 58
Matthew Korporaal Avatar answered Sep 19 '22 18:09

Matthew Korporaal