I use custom button in my app named “addButton” and I want to border it with white color how can i get the white color border around my custom button?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can set the border properties on the CALayer by accessing the layer property of the button.
First, add Quartz
Set properties:
See:
https://developer.apple.com/documentation/quartzcore/calayer#//apple_ref/occ/cl/CALayer
The CALayer in the link above allows you to set other properties like corner radius, maskToBounds etc…
Also, a good article on button fun:
https://web.archive.org/web/20161221132308/http://www.apptite.be/tutorial_custom_uibuttons.php