Chromium Code Reviews| 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 "ios/chrome/proto_today_extension/widget_view_controller.h" | |
| 6 | |
| 7 #import <NotificationCenter/NotificationCenter.h> | |
| 8 | |
| 9 #import "ios/chrome/proto_today_extension/widget_view.h" | |
| 10 | |
| 11 @interface WidgetViewController () | |
|
sdefresne
2017/01/17 17:47:42
Please put ARC guard:
#if !defined(__has_feature)
lody
2017/01/18 10:48:41
Done.
| |
| 12 @property(nonatomic, weak) WidgetView* widgetView; | |
| 13 @end | |
| 14 | |
| 15 @implementation WidgetViewController | |
| 16 | |
| 17 @synthesize widgetView = _widgetView; | |
| 18 | |
| 19 #pragma mark - UIViewController | |
| 20 | |
| 21 - (void)viewDidLoad { | |
| 22 [super viewDidLoad]; | |
| 23 | |
| 24 WidgetView* widgetView = [[WidgetView alloc] init]; | |
|
sdefresne
2017/01/17 17:47:42
nit: you don't need the local variable
self.wid
lody
2017/01/18 10:48:41
I do need it! The widgetView property is weak so i
sdefresne
2017/01/18 11:11:35
Ack. Thank you for the explanation. Can you add a
lody
2017/01/18 14:56:39
The same thing is done elsewhere (I copied this fr
| |
| 25 self.widgetView = widgetView; | |
| 26 [self.view addSubview:self.widgetView]; | |
| 27 } | |
| 28 | |
| 29 @end | |
| OLD | NEW |