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

Unified Diff: ios/chrome/search_widget_extension/ui_util.mm

Issue 2858253002: Adding search widget UI and functionality. (Closed)
Patch Set: comment and naming 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/search_widget_extension/ui_util.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/chrome/search_widget_extension/ui_util.mm
diff --git a/ios/chrome/search_widget_extension/ui_util.mm b/ios/chrome/search_widget_extension/ui_util.mm
new file mode 100644
index 0000000000000000000000000000000000000000..074f1954da63ab2fc1d6fc8e19b8056affbbe8de
--- /dev/null
+++ b/ios/chrome/search_widget_extension/ui_util.mm
@@ -0,0 +1,25 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#import <UIKit/UIKit.h>
+
+#include "ios/chrome/search_widget_extension/ui_util.h"
+
+#if !defined(__has_feature) || !__has_feature(objc_arc)
+#error "This file requires ARC support."
+#endif
+
+namespace ui_util {
+
+NSArray<NSLayoutConstraint*>* CreateSameConstraints(UIView* view1,
+ UIView* view2) {
+ return @[
+ [view1.leadingAnchor constraintEqualToAnchor:view2.leadingAnchor],
+ [view1.trailingAnchor constraintEqualToAnchor:view2.trailingAnchor],
+ [view1.topAnchor constraintEqualToAnchor:view2.topAnchor],
+ [view1.bottomAnchor constraintEqualToAnchor:view2.bottomAnchor]
+ ];
+}
+
+} // namespace ui_util
« no previous file with comments | « ios/chrome/search_widget_extension/ui_util.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698