Skip to content

Instantly share code, notes, and snippets.

@ymtky
Created September 17, 2018 10:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ymtky/c2c7c38fc36b23200ae283583dcb738a to your computer and use it in GitHub Desktop.
Save ymtky/c2c7c38fc36b23200ae283583dcb738a to your computer and use it in GitHub Desktop.
[Swift] UIViewの1辺にボーダーを設定
let bottomBorder = CALayer()
bottomBorder.frame = CGRect(x: 0, y: view.frame.height - 1, width: view.frame.width, height: 1.0)
bottomBorder.backgroundColor = UIColor.lightGray.cgColor
view.layer.addSublayer(bottomBorder)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment