Actually the question is simple. I don’t know what to add to the title of my question. I need to have button which has border and title and nothing else. The rest is transparent and background of my view is seen through the button. I have googled for it a lot and found nothing. Thanks in advance
Share
You can make the button of type UIButtonTypeCustom and add a border to its CALayer.
you need to
#import <QuartzCore/QuartzCore.h>to use the layer’s methods.EDIT (Answer to comments)
If you created the button in Interface Builder and connected to the proper outlet, then you shouldn’t create a new button in code, which is what you’re doing with
When you added the button in Interface Builder and connected it to the outlet, you already created it there, so just make sure that in IB it’s set to Custom, and just set the layers properties in code like shown above.