Skip to content

Commit 05ed697

Browse files
committed
fix(ios): ensure verticalTextAlignment works in all cases
1 parent 9ce0630 commit 05ed697

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/label.ios.ts

+10-2
Original file line numberDiff line numberDiff line change
@@ -446,13 +446,21 @@ export class Label extends LabelBase {
446446
this.setMeasuredDimension(widthAndState, heightAndState);
447447
}
448448
}
449-
_onSizeChanged() {
450-
super._onSizeChanged();
449+
onLayout(left, top, right, bottom) {
450+
super.onLayout(left, top, right, bottom);
451+
// we do on every layout pass or we might be out of sync
451452
this.updateVerticalAlignment();
452453
if (this.autoFontSize) {
453454
this.updateAutoFontSize({ textView: this.nativeTextViewProtected });
454455
}
455456
}
457+
// _onSizeChanged() {
458+
// super._onSizeChanged();
459+
// this.updateVerticalAlignment();
460+
// if (this.autoFontSize) {
461+
// this.updateAutoFontSize({ textView: this.nativeTextViewProtected });
462+
// }
463+
// }
456464
// _htmlTappable = false;
457465
// _htmlTapGestureRecognizer;
458466
// updateInteractionState(hasLink: boolean = false) {

0 commit comments

Comments
 (0)