OLD | NEW |
(Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #import <UIKit/UIKit.h> |
| 6 |
| 7 #include "ios/chrome/search_widget_extension/ui_util.h" |
| 8 |
| 9 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 10 #error "This file requires ARC support." |
| 11 #endif |
| 12 |
| 13 namespace ui_util { |
| 14 |
| 15 NSArray<NSLayoutConstraint*>* CreateSameConstraints(UIView* view1, |
| 16 UIView* view2) { |
| 17 return @[ |
| 18 [view1.leadingAnchor constraintEqualToAnchor:view2.leadingAnchor], |
| 19 [view1.trailingAnchor constraintEqualToAnchor:view2.trailingAnchor], |
| 20 [view1.topAnchor constraintEqualToAnchor:view2.topAnchor], |
| 21 [view1.bottomAnchor constraintEqualToAnchor:view2.bottomAnchor] |
| 22 ]; |
| 23 } |
| 24 |
| 25 } // namespace ui_util |
OLD | NEW |