I want to add medium thick black border and shadow to the buttons that I have added in my iPad application. I have taken those buttons as custom as I have applied images on them. How can I add border and shadow to ht
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.
To add shadows and border is simple.
1) Add the QuartzCore framework to your target.
2) Import the framework header in the class where you want to add borders and shadows. (Or if you have custom class for the button then you can simple import this framework in that class.)
3) To add the border to the button use this code (where
buttonis anIBOutletconnected with the button in interface):4) To add the shadow to the button use the following code:
You can play around with the values and see how it will affect the behaviour.