I have a UIView in which I define it\'s border in the following manner:
UIView
self.layer.borderColor = [UIColor blackColor].CGColor; self.layer.border
Depending on your view structure, it might be easier to add the subview to the parent of your main view. It can then overlap the main view and will overlay the border as you requested.