I have code that sets a border around a UITextView. It is correctly built in one class; when I take this code and copy it to another class (changing the name of the object), it no longer builds, saying: "The borderWidth property" cannot be found in the object of the direct class CALayer * "(same message for two other lines of code). I did a clean, rebuilt and nothing helps. Why is this happening? And how to fix it?
- (void)viewDidLoad {
[super viewDidLoad];
orderNotes.layer.borderWidth = 1.0f;
orderNotes.layer.borderColor = [[UIColor blackColor] CGColor];
orderNotes.layer.cornerRadius = 4;
}
The OrderNotes object is defined as a UITextView. There are no other errors.
source
share