Commit 13b272da authored by Gauthier Ambard's avatar Gauthier Ambard Committed by Commit Bot

[iOS] Fix switch compression resistance priority

This CL increases the switch compression resistance priority to make
sure that it doesn't get too compressed by the label.

Bug: 912698
Change-Id: Ib8926b6fbcc60394506a9b348e9f79e4a11fae5d
Reviewed-on: https://chromium-review.googlesource.com/c/1370274Reviewed-by: default avatarYi Su <mrsuyi@chromium.org>
Commit-Queue: Gauthier Ambard <gambard@chromium.org>
Cr-Commit-Position: refs/heads/master@{#615471}
parent 49dd35bd
......@@ -109,6 +109,10 @@ const CGFloat kIconImageSize = 28;
_switchView = [[UISwitch alloc] initWithFrame:CGRectZero];
_switchView.translatesAutoresizingMaskIntoConstraints = NO;
_switchView.onTintColor = UIColorFromRGB(kTableViewSwitchTintColor);
[_switchView
setContentCompressionResistancePriority:UILayoutPriorityDefaultHigh + 1
forAxis:
UILayoutConstraintAxisHorizontal];
_switchView.accessibilityHint = l10n_util::GetNSString(
IDS_IOS_TOGGLE_SETTING_SWITCH_ACCESSIBILITY_HINT);
[self.contentView addSubview:_switchView];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment