Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(22)

Side by Side Diff: ios/chrome/search_widget_extension/ui_util.mm

Issue 2858253002: Adding search widget UI and functionality. (Closed)
Patch Set: addressing comments Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698