I work in a class that is a subclass of UITableViewCell and has the properties firstLabel and secondLabel declared in .h and being @synthesize in .m. When I go to programmatically program UILabels, I try to set the border around firstLabel. From the answer given in this question , I tried to do the same in my project.
firstLabel.layer.borderColor = [UIColor blackColor].CGColor;
The problem is that he will not recognize it after entering firstLabel.layer. and press "esc" (for a list of completions). Xcode didn't come up with anything. What is the problem?
Note: if I type
firstLabel.textAlignment = UITextAlignmentCenter;
it works just fine and behaves as expected.
source share