A label with padding for iOS
- iOS 8.0 or later
- Xcode 9.0 or later
There is a way to use PaddingLabel in your project:
- Using CocoaPods
- Manually
pod 'PaddingLabel', '1.2'
Manually drag file PaddingLabel.swift to your project.
At this point your workspace should build without error. If you are having problem, post to the Issue and the community can help you solve it.
- Change class of
UILabel
in yourstoryboard
,xib
toPaddingLabel
.
import PaddingLabel
let label = PaddingLabel(frame: CGRect(x: 0, y: 0, width: 500, height: 100))
label.topInset = 5.0 //by default
label.bottomInset = 5.0 //by default
label.leftInset = 7.0 //by default
label.rightInset = 7.0 //by default
- If you need help, use Stack Overflow.
- If you found a bug, open an issue.
- If you have a feature request, open an issue.
- If you want to contribute, submit a pull request.
All source code is licensed under the MIT License.