Reputation: 2937
I'm adding a border to a UIImageView subclass of mine which works great:
self.layer.borderColor = [UIColor whiteColor].CGColor;
self.layer.borderWidth = 10;
Upon adding a UIImageView to the top of the image however, I noticed that the border is covering the image up!
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];
How can I fix this?
Upvotes: 2
Views: 7161
Reputation: 51374
If you don't find any alternative, try this,
or this,
Both are from same post. You can also find other answers there.
Upvotes: 2