From e07330ab597fbd8f13bc304852dfe488787d8b20 Mon Sep 17 00:00:00 2001 From: Yusuf U Date: Thu, 25 Aug 2022 22:41:20 +0300 Subject: [PATCH] UIButton contentHorizontalAlignment added. --- Sources/UIKitBuilder/UIButton+.swift | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Sources/UIKitBuilder/UIButton+.swift b/Sources/UIKitBuilder/UIButton+.swift index 2d1ab86..35889c4 100644 --- a/Sources/UIKitBuilder/UIButton+.swift +++ b/Sources/UIKitBuilder/UIButton+.swift @@ -126,4 +126,15 @@ public extension UIButton { setImage(image?.withRenderingMode(renderingMode), for: .normal) return self } + + @discardableResult func contentVerticalAlignment(_ alignment: UIControl.ContentVerticalAlignment) -> Self { + contentVerticalAlignment = alignment + return self + } + + @discardableResult func contentHorizontalAlignment(_ alignment: UIControl.ContentHorizontalAlignment) -> Self { + contentHorizontalAlignment = alignment + return self + } + }