This is a simple library enables vertical alignment of UILabel.
-
Set UILabel to Storyboard or XIB.
-
Change
Class
andModule
ofCustom Class
in Identity Inspector toVerticalAlignmentLabel
. -
Select property of
Vertical Alignment Label
in Attributes Inspector.
// var label: VerticalAlignmentLabel
label.verticalTextAlignment = .top
label.verticalTextAlignment = .center
label.verticalTextAlignment = .bottom
To 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, [email protected]
VerticalAlignmentLabel is available under the MIT license. See the LICENSE file for more info.