Commit 46e29e03 authored by stkhapugin@chromium.org's avatar stkhapugin@chromium.org Committed by Commit Bot

Use autolayout in LocationBarView

Uses autolayout in LocationBarView to position the omnibox textfield.

Bug: 
Cq-Include-Trybots: master.tryserver.chromium.mac:ios-simulator-cronet
Change-Id: If9f0f9ec65624785617bb3820d56509845f97e5e
Reviewed-on: https://chromium-review.googlesource.com/709215
Commit-Queue: Stepan Khapugin <stkhapugin@chromium.org>
Reviewed-by: default avatarRohit Rao (ping after 24h) <rohitrao@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515911}
parent f2357fd6
......@@ -110,14 +110,19 @@ NSString* const kOmniboxFadeAnimationKey = @"OmniboxFadeAnimation";
textColor:textColor
tintColor:tintColor];
[self addSubview:_textField];
[NSLayoutConstraint activateConstraints:@[
[_textField.leftAnchor constraintEqualToAnchor:self.leftAnchor],
[_textField.rightAnchor constraintEqualToAnchor:self.rightAnchor],
[_textField.topAnchor constraintEqualToAnchor:self.topAnchor],
[_textField.bottomAnchor constraintEqualToAnchor:self.bottomAnchor],
]];
_textField.translatesAutoresizingMaskIntoConstraints = NO;
}
return self;
}
- (void)layoutSubviews {
[super layoutSubviews];
self.textField.frame = self.bounds;
}
@end
......
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