I am using some labels in a view. I want to make rounded corner label in my iphone application. I use following code to do this but it’s not work. I got have some errors to use that properties.
label.layer.borderColor = [UIColor blueColor].CGColor;
label.layer.borderWidth = 4.0;
label.layer.cornerRadius = 8;
Hard to know for sure what you’re asking as you didn’t include the errors you’re getting. Have you added the
QuartzCoreframework to your project and#import <QuartzCore/CALayer.h>to the file modifying the layer? If that’s not it, add the errors and more info to your question.EDIT: you can also
#import <QuartzCore/QuartzCore.h>as suggested in the comments.QuartzCore.hincludesCALayer.halong with the rest of theQuartzCorecomponents.