Commit 8ae5d4b4 authored by Ewann's avatar Ewann Committed by Commit Bot

[iOS][Settings] Updates cells padding

This CL updates the padding between the icon and the text and also the
padding between detail text and the AccessoryType.
The position of the switch button is also modified in order to be
correctly aligned with AccessoryType of the other items.


Bug: 922511
Change-Id: I8b738a82d0b523c59344f145938be09f9022bc44
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2560637Reviewed-by: default avatarGauthier Ambard <gambard@chromium.org>
Commit-Queue: Ewann Pellé <ewannpv@chromium.org>
Cr-Commit-Position: refs/heads/master@{#831850}
parent 0bd1df48
...@@ -16,16 +16,6 @@ ...@@ -16,16 +16,6 @@
#error "This file requires ARC support." #error "This file requires ARC support."
#endif #endif
namespace {
// Padding used between the image and the text labels.
const CGFloat kTrailingImagePadding = 12;
// Size of the icon images.
const CGFloat kIconImageSize = 28;
} // namespace
@interface SettingsCheckCell () @interface SettingsCheckCell ()
// The image view for the trailing image. // The image view for the trailing image.
...@@ -134,7 +124,7 @@ const CGFloat kIconImageSize = 28; ...@@ -134,7 +124,7 @@ const CGFloat kIconImageSize = 28;
_textWithTrailingContentsConstraint = [textLayoutGuide.trailingAnchor _textWithTrailingContentsConstraint = [textLayoutGuide.trailingAnchor
constraintEqualToAnchor:_trailingImageView.leadingAnchor constraintEqualToAnchor:_trailingImageView.leadingAnchor
constant:-kTrailingImagePadding]; constant:-kTableViewImagePadding];
_textNoLeadingImageConstraint = [textLayoutGuide.leadingAnchor _textNoLeadingImageConstraint = [textLayoutGuide.leadingAnchor
constraintEqualToAnchor:contentView.leadingAnchor constraintEqualToAnchor:contentView.leadingAnchor
...@@ -142,7 +132,7 @@ const CGFloat kIconImageSize = 28; ...@@ -142,7 +132,7 @@ const CGFloat kIconImageSize = 28;
_textWithLeadingImageConstraint = [textLayoutGuide.leadingAnchor _textWithLeadingImageConstraint = [textLayoutGuide.leadingAnchor
constraintEqualToAnchor:_leadingImageView.trailingAnchor constraintEqualToAnchor:_leadingImageView.trailingAnchor
constant:kTableViewHorizontalSpacing]; constant:kTableViewImagePadding];
NSLayoutConstraint* heightConstraint = [self.contentView.heightAnchor NSLayoutConstraint* heightConstraint = [self.contentView.heightAnchor
constraintGreaterThanOrEqualToConstant:kChromeTableViewCellHeight]; constraintGreaterThanOrEqualToConstant:kChromeTableViewCellHeight];
...@@ -158,9 +148,10 @@ const CGFloat kIconImageSize = 28; ...@@ -158,9 +148,10 @@ const CGFloat kIconImageSize = 28;
[_trailingImageView.trailingAnchor [_trailingImageView.trailingAnchor
constraintEqualToAnchor:self.contentView.trailingAnchor constraintEqualToAnchor:self.contentView.trailingAnchor
constant:-kTableViewHorizontalSpacing], constant:-kTableViewHorizontalSpacing],
[_trailingImageView.widthAnchor constraintEqualToConstant:kIconImageSize], [_trailingImageView.widthAnchor
constraintEqualToConstant:kTableViewIconImageSize],
[_trailingImageView.heightAnchor [_trailingImageView.heightAnchor
constraintEqualToConstant:kIconImageSize], constraintEqualToAnchor:_trailingImageView.widthAnchor],
[_trailingImageView.centerYAnchor [_trailingImageView.centerYAnchor
constraintEqualToAnchor:textLayoutGuide.centerYAnchor], constraintEqualToAnchor:textLayoutGuide.centerYAnchor],
[_trailingImageView.leadingAnchor [_trailingImageView.leadingAnchor
...@@ -171,8 +162,10 @@ const CGFloat kIconImageSize = 28; ...@@ -171,8 +162,10 @@ const CGFloat kIconImageSize = 28;
[_infoButton.trailingAnchor [_infoButton.trailingAnchor
constraintEqualToAnchor:self.contentView.trailingAnchor constraintEqualToAnchor:self.contentView.trailingAnchor
constant:-kTableViewHorizontalSpacing], constant:-kTableViewHorizontalSpacing],
[_infoButton.widthAnchor constraintEqualToConstant:kIconImageSize], [_infoButton.widthAnchor
[_infoButton.heightAnchor constraintEqualToConstant:kIconImageSize], constraintEqualToConstant:kTableViewIconImageSize],
[_infoButton.heightAnchor
constraintEqualToAnchor:_infoButton.widthAnchor],
[_infoButton.centerYAnchor [_infoButton.centerYAnchor
constraintEqualToAnchor:textLayoutGuide.centerYAnchor], constraintEqualToAnchor:textLayoutGuide.centerYAnchor],
[_infoButton.leadingAnchor [_infoButton.leadingAnchor
...@@ -183,9 +176,10 @@ const CGFloat kIconImageSize = 28; ...@@ -183,9 +176,10 @@ const CGFloat kIconImageSize = 28;
[_activityIndicator.trailingAnchor [_activityIndicator.trailingAnchor
constraintEqualToAnchor:self.contentView.trailingAnchor constraintEqualToAnchor:self.contentView.trailingAnchor
constant:-kTableViewHorizontalSpacing], constant:-kTableViewHorizontalSpacing],
[_activityIndicator.widthAnchor constraintEqualToConstant:kIconImageSize], [_activityIndicator.widthAnchor
constraintEqualToConstant:kTableViewIconImageSize],
[_activityIndicator.heightAnchor [_activityIndicator.heightAnchor
constraintEqualToConstant:kIconImageSize], constraintEqualToAnchor:_activityIndicator.widthAnchor],
[_activityIndicator.centerYAnchor [_activityIndicator.centerYAnchor
constraintEqualToAnchor:textLayoutGuide.centerYAnchor], constraintEqualToAnchor:textLayoutGuide.centerYAnchor],
...@@ -193,8 +187,10 @@ const CGFloat kIconImageSize = 28; ...@@ -193,8 +187,10 @@ const CGFloat kIconImageSize = 28;
[_leadingImageView.leadingAnchor [_leadingImageView.leadingAnchor
constraintEqualToAnchor:self.contentView.leadingAnchor constraintEqualToAnchor:self.contentView.leadingAnchor
constant:kTableViewHorizontalSpacing], constant:kTableViewHorizontalSpacing],
[_leadingImageView.widthAnchor constraintEqualToConstant:kIconImageSize], [_leadingImageView.widthAnchor
[_leadingImageView.heightAnchor constraintEqualToConstant:kIconImageSize], constraintEqualToConstant:kTableViewIconImageSize],
[_leadingImageView.heightAnchor
constraintEqualToAnchor:_leadingImageView.widthAnchor],
[_leadingImageView.centerYAnchor [_leadingImageView.centerYAnchor
constraintEqualToAnchor:textLayoutGuide.centerYAnchor], constraintEqualToAnchor:textLayoutGuide.centerYAnchor],
......
...@@ -15,13 +15,15 @@ ...@@ -15,13 +15,15 @@
@interface SettingsImageDetailTextCell () @interface SettingsImageDetailTextCell ()
// Width constraint for the image view.
@property(nonatomic, weak, readonly) NSLayoutConstraint* imageWidthConstraint;
// Height constraint for the image view.
@property(nonatomic, weak, readonly) NSLayoutConstraint* imageHeightConstraint;
// Image view for the cell. // Image view for the cell.
@property(nonatomic, strong) UIImageView* imageView; @property(nonatomic, strong) UIImageView* imageView;
// Constraint used for leading text constraint without |imageView|.
@property(nonatomic, strong) NSLayoutConstraint* textNoImageConstraint;
// Constraint used for leading text constraint with |imageView| showing.
@property(nonatomic, strong) NSLayoutConstraint* textWithImageConstraint;
@end @end
@implementation SettingsImageDetailTextCell @implementation SettingsImageDetailTextCell
...@@ -73,29 +75,28 @@ ...@@ -73,29 +75,28 @@
textStackView.translatesAutoresizingMaskIntoConstraints = NO; textStackView.translatesAutoresizingMaskIntoConstraints = NO;
[contentView addSubview:textStackView]; [contentView addSubview:textStackView];
_imageWidthConstraint = [_imageView.widthAnchor constraintEqualToConstant:0]; _textNoImageConstraint = [textStackView.leadingAnchor
_imageHeightConstraint = constraintEqualToAnchor:contentView.leadingAnchor
[_imageView.heightAnchor constraintEqualToConstant:0]; constant:kTableViewHorizontalSpacing];
_textWithImageConstraint = [textStackView.leadingAnchor
constraintEqualToAnchor:_imageView.trailingAnchor
constant:kTableViewImagePadding];
[NSLayoutConstraint activateConstraints:@[ [NSLayoutConstraint activateConstraints:@[
// Horizontal contraints for |_imageView| and |textStackView|. [_imageView.widthAnchor constraintEqualToConstant:kTableViewIconImageSize],
_imageWidthConstraint, [_imageView.heightAnchor constraintEqualToAnchor:_imageView.widthAnchor],
[_imageView.leadingAnchor [_imageView.leadingAnchor
constraintEqualToAnchor:contentView.leadingAnchor constraintEqualToAnchor:contentView.leadingAnchor
constant:kTableViewHorizontalSpacing], constant:kTableViewHorizontalSpacing],
[textStackView.leadingAnchor
constraintEqualToAnchor:_imageView.trailingAnchor
constant:kTableViewHorizontalSpacing],
[contentView.trailingAnchor
constraintEqualToAnchor:textStackView.trailingAnchor
constant:kTableViewHorizontalSpacing],
// Vertical contraints for |_imageView| and |textStackView|.
_imageHeightConstraint,
[_imageView.centerYAnchor [_imageView.centerYAnchor
constraintEqualToAnchor:contentView.centerYAnchor], constraintEqualToAnchor:contentView.centerYAnchor],
[_imageView.topAnchor [_imageView.topAnchor
constraintGreaterThanOrEqualToAnchor:contentView.topAnchor constraintGreaterThanOrEqualToAnchor:contentView.topAnchor
constant:kTableViewVerticalSpacing], constant:kTableViewVerticalSpacing],
[contentView.trailingAnchor
constraintEqualToAnchor:textStackView.trailingAnchor
constant:kTableViewHorizontalSpacing],
[contentView.bottomAnchor [contentView.bottomAnchor
constraintGreaterThanOrEqualToAnchor:_imageView.bottomAnchor constraintGreaterThanOrEqualToAnchor:_imageView.bottomAnchor
constant:kTableViewVerticalSpacing], constant:kTableViewVerticalSpacing],
...@@ -117,10 +118,17 @@ ...@@ -117,10 +118,17 @@
} }
- (void)setImage:(UIImage*)image { - (void)setImage:(UIImage*)image {
DCHECK(image); BOOL hidden = !image;
self.imageView.image = image; self.imageView.image = image;
self.imageWidthConstraint.constant = image.size.width; self.imageView.hidden = hidden;
self.imageHeightConstraint.constant = image.size.height; // Update the leading text constraint based on |image| being provided.
if (hidden) {
self.textWithImageConstraint.active = NO;
self.textNoImageConstraint.active = YES;
} else {
self.textNoImageConstraint.active = NO;
self.textWithImageConstraint.active = YES;
}
} }
- (UIImage*)image { - (UIImage*)image {
......
...@@ -18,11 +18,10 @@ ...@@ -18,11 +18,10 @@
#endif #endif
namespace { namespace {
// Padding used between the icon and the text labels.
const CGFloat kIconTrailingPadding = 12;
// Size of the icon image. // Padding used between the |switchView| and the end of the |contentView|.
const CGFloat kIconImageSize = 28; const CGFloat kSwitchTrailingPadding = 22;
} // namespace } // namespace
@interface SettingsSwitchCell () @interface SettingsSwitchCell ()
...@@ -92,7 +91,7 @@ const CGFloat kIconImageSize = 28; ...@@ -92,7 +91,7 @@ const CGFloat kIconImageSize = 28;
// Set up the constraints assuming that the icon image is hidden. // Set up the constraints assuming that the icon image is hidden.
_iconVisibleConstraint = [textLayoutGuide.leadingAnchor _iconVisibleConstraint = [textLayoutGuide.leadingAnchor
constraintEqualToAnchor:_iconImageView.trailingAnchor constraintEqualToAnchor:_iconImageView.trailingAnchor
constant:kIconTrailingPadding]; constant:kTableViewImagePadding];
_iconHiddenConstraint = [textLayoutGuide.leadingAnchor _iconHiddenConstraint = [textLayoutGuide.leadingAnchor
constraintEqualToAnchor:self.contentView.leadingAnchor constraintEqualToAnchor:self.contentView.leadingAnchor
constant:kTableViewHorizontalSpacing]; constant:kTableViewHorizontalSpacing];
...@@ -108,7 +107,7 @@ const CGFloat kIconImageSize = 28; ...@@ -108,7 +107,7 @@ const CGFloat kIconImageSize = 28;
[_switchView.trailingAnchor [_switchView.trailingAnchor
constraintEqualToAnchor:self.contentView.trailingAnchor constraintEqualToAnchor:self.contentView.trailingAnchor
constant:-kTableViewHorizontalSpacing], constant:-kSwitchTrailingPadding],
]; ];
_accessibilityConstraints = @[ _accessibilityConstraints = @[
[_switchView.topAnchor [_switchView.topAnchor
...@@ -129,8 +128,10 @@ const CGFloat kIconImageSize = 28; ...@@ -129,8 +128,10 @@ const CGFloat kIconImageSize = 28;
[_iconImageView.leadingAnchor [_iconImageView.leadingAnchor
constraintEqualToAnchor:self.contentView.leadingAnchor constraintEqualToAnchor:self.contentView.leadingAnchor
constant:kTableViewHorizontalSpacing], constant:kTableViewHorizontalSpacing],
[_iconImageView.widthAnchor constraintEqualToConstant:kIconImageSize], [_iconImageView.widthAnchor
[_iconImageView.heightAnchor constraintEqualToConstant:kIconImageSize], constraintEqualToConstant:kTableViewIconImageSize],
[_iconImageView.heightAnchor
constraintEqualToAnchor:_iconImageView.widthAnchor],
[_iconImageView.centerYAnchor [_iconImageView.centerYAnchor
constraintEqualToAnchor:textLayoutGuide.centerYAnchor], constraintEqualToAnchor:textLayoutGuide.centerYAnchor],
......
...@@ -47,6 +47,12 @@ extern const CGFloat kTableViewLabelVerticalTopSpacing; ...@@ -47,6 +47,12 @@ extern const CGFloat kTableViewLabelVerticalTopSpacing;
// The width taken by the accessory view when it is displayed. // The width taken by the accessory view when it is displayed.
extern const CGFloat kTableViewAccessoryWidth; extern const CGFloat kTableViewAccessoryWidth;
// Size of the icon image.
extern const CGFloat kTableViewIconImageSize;
// Padding used between the image and the text labels.
extern const CGFloat kTableViewImagePadding;
// A masked password string(e.g. "••••••••"). // A masked password string(e.g. "••••••••").
extern NSString* const kMaskedPassword; extern NSString* const kMaskedPassword;
......
...@@ -21,6 +21,8 @@ const CGFloat kTableViewCellSelectionAnimationDuration = 0.15; ...@@ -21,6 +21,8 @@ const CGFloat kTableViewCellSelectionAnimationDuration = 0.15;
const CGFloat kUseDefaultFontSize = 0.0; const CGFloat kUseDefaultFontSize = 0.0;
const CGFloat kTableViewLabelVerticalTopSpacing = 13.0; const CGFloat kTableViewLabelVerticalTopSpacing = 13.0;
const CGFloat kTableViewAccessoryWidth = 40; const CGFloat kTableViewAccessoryWidth = 40;
const CGFloat kTableViewIconImageSize = 28;
const CGFloat kTableViewImagePadding = 12;
NSString* const kMaskedPassword = @"••••••••"; NSString* const kMaskedPassword = @"••••••••";
NSString* const kTableViewCellInfoButtonViewId = NSString* const kTableViewCellInfoButtonViewId =
......
...@@ -19,13 +19,11 @@ ...@@ -19,13 +19,11 @@
namespace { namespace {
// Padding used between the icon and the text labels.
const CGFloat kIconTrailingPadding = 12;
// Size of the icon image.
const CGFloat kIconImageSize = 28;
// Proportion of Cell's textLabel/detailTextLabel. This guarantees that the // Proportion of Cell's textLabel/detailTextLabel. This guarantees that the
// textLabel occupies 75% of the row space and detailTextLabel occupies 25%. // textLabel occupies 75% of the row space and detailTextLabel occupies 25%.
const CGFloat kCellLabelsWidthProportion = 3.0f; const CGFloat kCellLabelsWidthProportion = 3.0f;
// Padding used between the detail text and the AccessoryType.
const CGFloat kDetailTextTrailingPadding = 6;
} // namespace } // namespace
...@@ -73,7 +71,6 @@ const CGFloat kCellLabelsWidthProportion = 3.0f; ...@@ -73,7 +71,6 @@ const CGFloat kCellLabelsWidthProportion = 3.0f;
@implementation TableViewDetailIconCell { @implementation TableViewDetailIconCell {
UIImageView* _iconImageView; UIImageView* _iconImageView;
UILayoutGuide* _labelContainerGuide;
NSLayoutConstraint* _iconHiddenConstraint; NSLayoutConstraint* _iconHiddenConstraint;
NSLayoutConstraint* _iconVisibleConstraint; NSLayoutConstraint* _iconVisibleConstraint;
} }
...@@ -93,11 +90,6 @@ const CGFloat kCellLabelsWidthProportion = 3.0f; ...@@ -93,11 +90,6 @@ const CGFloat kCellLabelsWidthProportion = 3.0f;
_iconImageView.hidden = YES; _iconImageView.hidden = YES;
[contentView addSubview:_iconImageView]; [contentView addSubview:_iconImageView];
// Constrain the labels inside a container view, to make width computations
// easier.
_labelContainerGuide = [[UILayoutGuide alloc] init];
[contentView addLayoutGuide:_labelContainerGuide];
_textLabel = [[UILabel alloc] init]; _textLabel = [[UILabel alloc] init];
_textLabel.translatesAutoresizingMaskIntoConstraints = NO; _textLabel.translatesAutoresizingMaskIntoConstraints = NO;
_textLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody]; _textLabel.font = [UIFont preferredFontForTextStyle:UIFontTextStyleBody];
...@@ -117,12 +109,12 @@ const CGFloat kCellLabelsWidthProportion = 3.0f; ...@@ -117,12 +109,12 @@ const CGFloat kCellLabelsWidthProportion = 3.0f;
// Set up the constraints for when the icon is visible and hidden. One of // Set up the constraints for when the icon is visible and hidden. One of
// these will be active at a time, defaulting to hidden. // these will be active at a time, defaulting to hidden.
_iconHiddenConstraint = [_labelContainerGuide.leadingAnchor _iconHiddenConstraint = [_textLabel.leadingAnchor
constraintEqualToAnchor:contentView.leadingAnchor constraintEqualToAnchor:contentView.leadingAnchor
constant:kTableViewHorizontalSpacing]; constant:kTableViewHorizontalSpacing];
_iconVisibleConstraint = [_labelContainerGuide.leadingAnchor _iconVisibleConstraint = [_textLabel.leadingAnchor
constraintEqualToAnchor:_iconImageView.trailingAnchor constraintEqualToAnchor:_iconImageView.trailingAnchor
constant:kIconTrailingPadding]; constant:kTableViewImagePadding];
// In case the two labels don't fit in width, have the |textLabel| be 3 // In case the two labels don't fit in width, have the |textLabel| be 3
// times the width of the |detailTextLabel| (so 75% / 25%). // times the width of the |detailTextLabel| (so 75% / 25%).
...@@ -144,7 +136,8 @@ const CGFloat kCellLabelsWidthProportion = 3.0f; ...@@ -144,7 +136,8 @@ const CGFloat kCellLabelsWidthProportion = 3.0f;
[_detailTextLabel.firstBaselineAnchor [_detailTextLabel.firstBaselineAnchor
constraintEqualToAnchor:_textLabel.firstBaselineAnchor], constraintEqualToAnchor:_textLabel.firstBaselineAnchor],
[_detailTextLabel.trailingAnchor [_detailTextLabel.trailingAnchor
constraintEqualToAnchor:_labelContainerGuide.trailingAnchor], constraintEqualToAnchor:contentView.trailingAnchor
constant:-kDetailTextTrailingPadding],
widthConstraint, widthConstraint,
]; ];
...@@ -164,7 +157,7 @@ const CGFloat kCellLabelsWidthProportion = 3.0f; ...@@ -164,7 +157,7 @@ const CGFloat kCellLabelsWidthProportion = 3.0f;
[_detailTextLabel.leadingAnchor [_detailTextLabel.leadingAnchor
constraintEqualToAnchor:_textLabel.leadingAnchor], constraintEqualToAnchor:_textLabel.leadingAnchor],
[_detailTextLabel.trailingAnchor [_detailTextLabel.trailingAnchor
constraintLessThanOrEqualToAnchor:_labelContainerGuide.trailingAnchor constraintLessThanOrEqualToAnchor:contentView.trailingAnchor
constant:-kTableViewHorizontalSpacing], constant:-kTableViewHorizontalSpacing],
]; ];
...@@ -172,16 +165,10 @@ const CGFloat kCellLabelsWidthProportion = 3.0f; ...@@ -172,16 +165,10 @@ const CGFloat kCellLabelsWidthProportion = 3.0f;
[_iconImageView.leadingAnchor [_iconImageView.leadingAnchor
constraintEqualToAnchor:contentView.leadingAnchor constraintEqualToAnchor:contentView.leadingAnchor
constant:kTableViewHorizontalSpacing], constant:kTableViewHorizontalSpacing],
[_iconImageView.widthAnchor constraintEqualToConstant:kIconImageSize], [_iconImageView.widthAnchor
[_iconImageView.heightAnchor constraintEqualToConstant:kIconImageSize], constraintEqualToConstant:kTableViewIconImageSize],
[_iconImageView.heightAnchor
// Fix the edges of the text labels. constraintEqualToAnchor:_iconImageView.widthAnchor],
[_textLabel.leadingAnchor
constraintEqualToAnchor:_labelContainerGuide.leadingAnchor],
[_labelContainerGuide.trailingAnchor
constraintEqualToAnchor:contentView.trailingAnchor
constant:-kTableViewHorizontalSpacing],
[_iconImageView.centerYAnchor [_iconImageView.centerYAnchor
constraintEqualToAnchor:contentView.centerYAnchor], constraintEqualToAnchor:contentView.centerYAnchor],
_iconHiddenConstraint, _iconHiddenConstraint,
......
...@@ -20,12 +20,6 @@ ...@@ -20,12 +20,6 @@
namespace { namespace {
// Padding used between the icon and the text labels.
const CGFloat kIconTrailingPadding = 12;
// Size of the icon image.
const CGFloat kIconImageSize = 28;
// Proportion of |textLayoutGuide| and |statusTextLabel|. This guarantees both // Proportion of |textLayoutGuide| and |statusTextLabel|. This guarantees both
// of them at least occupies 20% of the cell. // of them at least occupies 20% of the cell.
const CGFloat kCellLabelsWidthProportion = 0.2f; const CGFloat kCellLabelsWidthProportion = 0.2f;
...@@ -115,7 +109,7 @@ const CGFloat kCellLabelsWidthProportion = 0.2f; ...@@ -115,7 +109,7 @@ const CGFloat kCellLabelsWidthProportion = 0.2f;
// Set up the constraints assuming that the icon image is hidden. // Set up the constraints assuming that the icon image is hidden.
_iconVisibleConstraint = [textLayoutGuide.leadingAnchor _iconVisibleConstraint = [textLayoutGuide.leadingAnchor
constraintEqualToAnchor:_iconImageView.trailingAnchor constraintEqualToAnchor:_iconImageView.trailingAnchor
constant:kIconTrailingPadding]; constant:kTableViewImagePadding];
_iconHiddenConstraint = [textLayoutGuide.leadingAnchor _iconHiddenConstraint = [textLayoutGuide.leadingAnchor
constraintEqualToAnchor:self.contentView.leadingAnchor constraintEqualToAnchor:self.contentView.leadingAnchor
constant:kTableViewHorizontalSpacing]; constant:kTableViewHorizontalSpacing];
...@@ -199,8 +193,10 @@ const CGFloat kCellLabelsWidthProportion = 0.2f; ...@@ -199,8 +193,10 @@ const CGFloat kCellLabelsWidthProportion = 0.2f;
[_iconImageView.leadingAnchor [_iconImageView.leadingAnchor
constraintEqualToAnchor:self.contentView.leadingAnchor constraintEqualToAnchor:self.contentView.leadingAnchor
constant:kTableViewHorizontalSpacing], constant:kTableViewHorizontalSpacing],
[_iconImageView.widthAnchor constraintEqualToConstant:kIconImageSize], [_iconImageView.widthAnchor
[_iconImageView.heightAnchor constraintEqualToConstant:kIconImageSize], constraintEqualToConstant:kTableViewIconImageSize],
[_iconImageView.heightAnchor
constraintEqualToAnchor:_iconImageView.widthAnchor],
[_iconImageView.centerYAnchor [_iconImageView.centerYAnchor
constraintEqualToAnchor:textLayoutGuide.centerYAnchor], constraintEqualToAnchor:textLayoutGuide.centerYAnchor],
......
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