Xcode 5 Round Rect Buttons

后端 未结 7 664
借酒劲吻你
借酒劲吻你 2021-01-30 06:56

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 ju

7条回答
  •  太阳男子
    2021-01-30 07:02

    Here's a similar answer to the one I gave to this question:

    -EDIT-
    Add: #import to the top of your .h file.

    If you want rounded corners just ctrl-drag from the button to your .h file, call it something like roundedButton and add this in your viewDidLoad:

    CALayer *btnLayer = [roundedButton layer];
    [btnLayer setMasksToBounds:YES];
    [btnLayer setCornerRadius:5.0f];
    

    To make the button white (or any other colour), select the attributes inspector and scroll down to the View section, select Background and change it to White:

    enter image description here

提交回复
热议问题