StoryboardやXIB上で設定したかったのでライブラリにしました。
インストール
pod "VerticalAlignmentLabel"
StoryboardやXIBでUILabelを貼り付けたら、ClassとModuleを以下のように変更します。
次にAttribute Inspectorに移動し、TopまたはButtomをOnにします。
(*両方OnだとBottomになります。)
実行結果
コード上の指定だとこのようになります。
// var label: VerticalAlignmentLabel
label.verticalTextAlignment = .top
label.verticalTextAlignment = .center
label.verticalTextAlignment = .bottom