Reputation: 4032
I have an imageview and a label, I want a border in between them, what is the best approach?
I know that the following code creates a border around the whole imageView:
[imageView.layer setBorderColor: [[UIColor blackColor] CGColor]];
[imageView.layer setBorderWidth: 2.0];
But I only want a line below it, not around the whole thing.
Upvotes: 5
Views: 6273
Reputation: 3999
Just add an UILabel
with background color as black(Assuming your border color as black) and height of 1px between you UIImageView
and UILabel
this would be much simpler.
Upvotes: 5