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.
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
- Custom UITableview cell accessibility not working
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Can not export audiofiles via “open in:” from Voic
- XCode 4.5 giving me “SenTestingKit/SenTestKit.h” f
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.
Swift 2.0:
Click on the button you want to get rounded. Then click on the Identity Inspector on the right top side. There You can see User Defined Runtime Attributes. Click on plus (+)
You wont see the changes in View. You will see it in Runtime
Here's a similar answer to the one I gave to this question:
-EDIT-
Add:
#import <QuartzCore/QuartzCore.h>
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 likeroundedButton
and add this in yourviewDidLoad
: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:Set a background image on your buttons with the desired borders, using a stretchable image.
Check this link for a good example: Stretch background image for UIButton
OR, embrace the new iOS7 UI and scrap the borders ... ;-)
In Swift 3: we can added it viewdidload