Skip to content

Latest commit

 

History

History
27 lines (16 loc) · 665 Bytes

README.md

File metadata and controls

27 lines (16 loc) · 665 Bytes

SwiftBorders

A Swift extension on UIView to easily add borders to text fields or labels

How to use it?

  • Add Borders.swift to your project
  • Add the borders in viewDidLayoutSubviews method, you can optionally define the color. For example:
override func viewDidLayoutSubviews() {
    phoneNumberTextField.addBorder(.bottom)
    countryCodeLabel.addBorder(.right)
    countryCodeLabel.addBorder(.bottom)
}  

Result:

Screenshot

Twitter: @gusta_nas

Website: gustanas.co