If a add a border of a view using code in a view like
self.layer.borderColor = [UIColor yellowColor].CGColor; self.layer.borderWidth = 2.0f;
the border is added inside the view like the following:
the right view is the original view, as you can see, the black area of bordered view is less than the original one. but what I want to get is a border outside of original view, like this:. the black area is equal to original one, how can I implement it?