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?
Ios – How to create border in UIButton
iosobjective c
Related Topic
- Ios – How to link to apps on the app store
- Ios – How to sort an NSMutableArray with custom objects in it
- Ios – Xcode – How to fix ‘NSUnknownKeyException’, reason: … this class is not key value coding-compliant for the key X” error
- Ios – Passing data between view controllers
- Ios – performSelector may cause a leak because its selector is unknown
- Ios – How to animate constraint changes
- Ios – How to change Status Bar text color in iOS
- Ios – Color Tint UIButton Image
Best Answer
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