I am making my app ready for iOS7. I did conversion and was working with a user. The button in the app does not look like button. Looks very flat. Is there someway to put border or make it stand like a button?
You can set the border properties on the CALayer by accessing the layer property of the button. The CALayer in the link above allows you to set other properties like corner radius, maskToBounds etc... Make sure you link your target to the QuartCore framework in the Build Phases tab of the target editor.
Border Color you can set your UIButton User Defined Run Time Attributes ie borderWidth, cornerRadius, borderColor etc. As shown in the image. Note:- don't use layer. before the attribute name, it will not work.
Try this for adding border, It will work
#import <QuartzCore/QuartzCore.h>
then in viewDidLoad
_btn.layer.borderWidth=1.0f; _btn.layer.borderColor=[[UIColor blackColor] CGColor]; _btn.layer.cornerRadius = 10;
also you can fill the color for making appearance somewhat like button, or best way is to use image there
Apart from BorderColor, you can do it by using Runtime attributes too.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With