【发布时间】:2011-05-31 07:22:33
【问题描述】:
我正在为我的 UIImageView 子类添加边框,效果很好:
self.layer.borderColor = [UIColor whiteColor].CGColor;
self.layer.borderWidth = 10;
然而,在图像顶部添加 UIImageView 后,我注意到边框覆盖了图像!
UIImage*pin = [UIImage imageNamed:@"PinDown2"];
UIImageView*view = [[UIImageView alloc] initWithImage:pin];
view.frame = CGRectMake(self.bounds.size.width/2, 0, 32, 39);
[self addSubview:view];
我该如何解决这个问题?
【问题讨论】:
标签: iphone objective-c ios cocoa-touch uiimageview