diff --git a/tns-core-modules/ui/button/button.ios.ts b/tns-core-modules/ui/button/button.ios.ts index 3124a81be..0df531095 100644 --- a/tns-core-modules/ui/button/button.ios.ts +++ b/tns-core-modules/ui/button/button.ios.ts @@ -145,16 +145,16 @@ export class Button extends ButtonBase { [textAlignmentProperty.setNative](value: TextAlignment) { switch (value) { - case "left": - this.nativeView.contentHorizontalAlignment = UIControlContentHorizontalAlignment.Left; - break; - case "initial": - case "center": - this.nativeView.contentHorizontalAlignment = UIControlContentHorizontalAlignment.Center; - break; - case "right": - this.nativeView.contentHorizontalAlignment = UIControlContentHorizontalAlignment.Right; - break; + case "left": + this.nativeView.titleLabel.textAlignment = NSTextAlignment.Left; + break; + case "initial": + case "center": + this.nativeView.titleLabel.textAlignment = NSTextAlignment.Center; + break; + case "right": + this.nativeView.titleLabel.textAlignment = NSTextAlignment.Right; + break; } } @@ -193,4 +193,4 @@ class TapHandlerImpl extends NSObject { public static ObjCExposedMethods = { "tap": { returns: interop.types.void, params: [interop.types.id] } }; -} \ No newline at end of file +}