Я хочу показать только < /strong> нижняя граница и скрыть другие стороны. Только нужно нижнюю белую толстую границу 2.0. < /P>
< /p>
Code я использую (Source): < /p>
(Source): < /p>
Code Ivar border = CALayer()
var width = CGFloat(2.0)
border.borderColor = UIColor.whiteColor().CGColor
border.frame = CGRect(x: 0, y: tv_username.frame.size.height - width, width: tv_username.frame.size.width, height: tv_username.frame.size.height)
border.borderWidth = width
tv_username.backgroundColor = UIColor.clearColor()
tv_username.layer.addSublayer(border)
tv_username.layer.masksToBounds = true
tv_username.textColor = UIColor.whiteColor()
Подробнее здесь: https://stackoverflow.com/questions/311 ... d-in-swift