Chromium Code Reviews| Index: ios/chrome/widget_extension/widget_view_controller.mm |
| diff --git a/ios/chrome/widget_extension/widget_view_controller.mm b/ios/chrome/widget_extension/widget_view_controller.mm |
| index dfe050a6a5c0766cc0e7d3564151b35788ff1729..df2c1b44a16ad2299d88919fd485f249b8536ce7 100644 |
| --- a/ios/chrome/widget_extension/widget_view_controller.mm |
| +++ b/ios/chrome/widget_extension/widget_view_controller.mm |
| @@ -12,7 +12,7 @@ |
| #error "This file requires ARC support." |
| #endif |
| -@interface WidgetViewController () |
| +@interface WidgetViewController ()<NCWidgetProviding> |
|
Olivier
2017/01/19 10:33:07
Do you use anything from this protocol?
lody
2017/01/19 13:17:55
hmm, not yet. I was experimenting. I'll remove it
|
| @property(nonatomic, weak) WidgetView* widgetView; |
| @end |
| @@ -30,6 +30,18 @@ |
| WidgetView* widgetView = [[WidgetView alloc] init]; |
| self.widgetView = widgetView; |
| [self.view addSubview:self.widgetView]; |
| + |
| + [self.widgetView setTranslatesAutoresizingMaskIntoConstraints:NO]; |
| + [NSLayoutConstraint activateConstraints:@[ |
| + [self.widgetView.leadingAnchor |
| + constraintEqualToAnchor:[self.view leadingAnchor]], |
| + [self.widgetView.trailingAnchor |
| + constraintEqualToAnchor:[self.view trailingAnchor]], |
| + [self.widgetView.heightAnchor |
| + constraintEqualToAnchor:[self.view heightAnchor]], |
| + [self.widgetView.widthAnchor |
| + constraintEqualToAnchor:[self.view widthAnchor]] |
| + ]]; |
| } |
| @end |