Commit 77d740e3 authored by Yuwei Huang's avatar Yuwei Huang Committed by Commit Bot

[CRD iOS] Attach the bottom of the connection view icon to the center of the view

Rather than using the fixed kTopPadding. This ensures the UI is mostly
centered in screen size and orientation.

Change-Id: Ia78f020a84566873ceb08f837917b5bf722ab4af
Reviewed-on: https://chromium-review.googlesource.com/571682Reviewed-by: default avatarScott Nichols <nicholss@chromium.org>
Commit-Queue: Yuwei Huang <yuweih@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486956}
parent 50dcda71
...@@ -36,7 +36,6 @@ static const CGFloat kPinEntryViewHeight = 90.f; ...@@ -36,7 +36,6 @@ static const CGFloat kPinEntryViewHeight = 90.f;
static const CGFloat kReconnectViewWidth = 120.f; static const CGFloat kReconnectViewWidth = 120.f;
static const CGFloat kReconnectViewHeight = 90.f; static const CGFloat kReconnectViewHeight = 90.f;
static const CGFloat kTopPadding = 240.f;
static const CGFloat kPadding = 20.f; static const CGFloat kPadding = 20.f;
static const CGFloat kMargin = 20.f; static const CGFloat kMargin = 20.f;
...@@ -197,7 +196,6 @@ static const CGFloat kKeyboardAnimationTime = 0.3; ...@@ -197,7 +196,6 @@ static const CGFloat kKeyboardAnimationTime = 0.3;
NSDictionary* layoutMetrics = @{ NSDictionary* layoutMetrics = @{
@"padding" : @(kPadding), @"padding" : @(kPadding),
@"margin" : @(kMargin), @"margin" : @(kMargin),
@"topPadding" : @(kTopPadding),
@"iconDiameter" : @(kIconRadius * 2), @"iconDiameter" : @(kIconRadius * 2),
@"pinEntryViewWidth" : @(kPinEntryViewWidth), @"pinEntryViewWidth" : @(kPinEntryViewWidth),
@"pinEntryViewHeight" : @(kPinEntryViewHeight), @"pinEntryViewHeight" : @(kPinEntryViewHeight),
...@@ -237,9 +235,8 @@ static const CGFloat kKeyboardAnimationTime = 0.3; ...@@ -237,9 +235,8 @@ static const CGFloat kKeyboardAnimationTime = 0.3;
views:views]]; views:views]];
// Anchors: // Anchors:
_activityIndicatorTopConstraintFull = _activityIndicatorTopConstraintFull = [_activityIndicator.bottomAnchor
[_activityIndicator.topAnchor constraintEqualToAnchor:self.view.topAnchor constraintEqualToAnchor:self.view.centerYAnchor];
constant:kTopPadding];
_activityIndicatorTopConstraintFull.active = YES; _activityIndicatorTopConstraintFull.active = YES;
[_iconView.centerYAnchor [_iconView.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