Reputation: 10594
I am creating user interface for app in storyboard, but I can not find where I can set the border for a button to be visible in storyboard. How do I set the border of a button?
Upvotes: 2
Views: 3269
Reputation: 2190
If you just want to visualize the button, you could check this after setting the constraints of the Button:
Or, by setting the style of the UIButton
:
If none of above meet your requirements, you have to set the border of the button in the code:
@IBOutlet weak var myButton: UIButton!
myButton.layer.borderWidth = 1.0
myButton.layer.borderColor = UIColor.redColor().CGColor
Upvotes: 1
Reputation: 14857
Select Xcode -> Open Editor menu -> Canvas -> Show Bounds Rectangles
Note that all views will have borders and only be visible in storyboard(design time).
Upvotes: 9