Skip to content

Latest commit

 

History

History
46 lines (38 loc) · 1.21 KB

README.md

File metadata and controls

46 lines (38 loc) · 1.21 KB

Oneline

Language License Platform Pod Version

How to use

Initialize UIView then chain setting its properties.

let label = UILabel("Hi, there!").font(.systemFont(ofSize: 12)).color(.blue).lines().bgColor(.green).align(.center)

Instead of

let label = UILabel()
label.text = "Hi, there!"
label.font = .systemFont(ofSize: 12)
label.textColor = .blue
label.numberOfLines = 0
label.backgroundColor = .green
label.textAlignment = .center

Supported Controls:

  • UIView ⬜️
  • UIControl 🔳
  • UIButton 🔵
  • UILabel ☗
  • UITextField ✒︎
  • UIStackView ❏

Cocoapods

Add the following entry in your Podfile

pod 'Oneline'

Then run pod install.

Contribution

Feel free to fork, pull to request for your commonly used UIView subclasses.

License

Oneline is released under an MIT license.