我正在为我的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];
我该如何解决这个问题?