This is a simple library enables vertical alignment of UILabel.
-
Set UILabel to Storyboard or XIB.
-
Change
ClassandModuleofCustom Classin Identity Inspector toVerticalAlignmentLabel.
-
Select property of
Vertical Alignment Labelin Attributes Inspector.
// var label: VerticalAlignmentLabel
label.verticalTextAlignment = .top
label.verticalTextAlignment = .center
label.verticalTextAlignment = .bottomTo run the example project, clone the repo, and run pod install from the Example directory first.
- Swift 3.0 or later
- iOS 8.0 or later
VerticalAlignmentLabel is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "VerticalAlignmentLabel"darquro, yuki.kuro96@gmail.com
VerticalAlignmentLabel is available under the MIT license. See the LICENSE file for more info.
