| OLD | NEW |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_foo
ter_item.h" | 5 #import "ios/chrome/browser/ui/content_suggestions/cells/content_suggestions_foo
ter_item.h" |
| 6 | 6 |
| 7 #import "ios/chrome/browser/ui/uikit_ui_util.h" | 7 #import "ios/chrome/browser/ui/uikit_ui_util.h" |
| 8 | 8 |
| 9 #if !defined(__has_feature) || !__has_feature(objc_arc) | 9 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 10 #error "This file requires ARC support." | 10 #error "This file requires ARC support." |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 | 67 |
| 68 - (instancetype)initWithFrame:(CGRect)frame { | 68 - (instancetype)initWithFrame:(CGRect)frame { |
| 69 self = [super initWithFrame:frame]; | 69 self = [super initWithFrame:frame]; |
| 70 if (self) { | 70 if (self) { |
| 71 _button = [UIButton buttonWithType:UIButtonTypeSystem]; | 71 _button = [UIButton buttonWithType:UIButtonTypeSystem]; |
| 72 _button.translatesAutoresizingMaskIntoConstraints = NO; | 72 _button.translatesAutoresizingMaskIntoConstraints = NO; |
| 73 [self.contentView addSubview:_button]; | 73 [self.contentView addSubview:_button]; |
| 74 [_button.heightAnchor | 74 [_button.heightAnchor |
| 75 constraintGreaterThanOrEqualToConstant:kMinimalCellHeight] | 75 constraintGreaterThanOrEqualToConstant:kMinimalCellHeight] |
| 76 .active = YES; | 76 .active = YES; |
| 77 AddSameSizeConstraint(self.contentView, _button); | 77 AddSameConstraints(self.contentView, _button); |
| 78 } | 78 } |
| 79 return self; | 79 return self; |
| 80 } | 80 } |
| 81 | 81 |
| 82 - (void)prepareForReuse { | 82 - (void)prepareForReuse { |
| 83 [self.button removeTarget:nil | 83 [self.button removeTarget:nil |
| 84 action:NULL | 84 action:NULL |
| 85 forControlEvents:UIControlEventAllEvents]; | 85 forControlEvents:UIControlEventAllEvents]; |
| 86 } | 86 } |
| 87 | 87 |
| 88 @end | 88 @end |
| OLD | NEW |