I am working in a application where i need to add underline in UITabbarItem
.
so i would like to add underline under the selected UITabbarItem
i
Use this code to add a bottom border to any UIView
object, just replace view
with your UITabbarItem
object:
CALayer *bottomBorder = [CALayer layer];
bottomBorder.frame = CGRectMake(0, view.frame.size.height - 1, view.frame.size.width - 1, 1);
bottomBorder.backgroundColor = [UIColor lightGrayColor].CGColor;
[view.layer addSublayer:bottomBorder];