Skip to content

hoangta/Oneline

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

20 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

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.

About

๐Ÿ“Ž Set common views' properties in a condensed way - single line.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published