【发布时间】:2011-02-11 23:38:18
【问题描述】:
我在两个不同的类(UIView 的两个子类)中有以下代码。在一个地方它工作正常,边界被绘制。在另一个地方,我收到有关未找到方法的警告,当然也没有绘制边框。这怎么可能?
UIView* test = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 100,100)];
test.backgroundColor = [UIColor redColor];
[test.layer setBorderColor: [[UIColor blueColor] CGColor]]; //no '-setBorderColor:' method found
[test.layer setBorderWidth: 1.0]; //no '-setBorderWidth:' method found
[self addSubview:test];
【问题讨论】:
标签: objective-c ios uiview core-animation