Chromium Code Reviews| Index: ios/chrome/browser/ui/bubble_promo/bubble_view.mm |
| diff --git a/ios/chrome/browser/ui/bubble_promo/bubble_view.mm b/ios/chrome/browser/ui/bubble_promo/bubble_view.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..bf1287977b6ab0f40df87894e8c293c0170f4e87 |
| --- /dev/null |
| +++ b/ios/chrome/browser/ui/bubble_promo/bubble_view.mm |
| @@ -0,0 +1,32 @@ |
| +// 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 "ios/chrome/browser/ui/bubble_promo/bubble_view.h" |
| + |
| +#if !defined(__has_feature) || !__has_feature(objc_arc) |
| +#error "This file requires ARC support." |
| +#endif |
| + |
| +@interface BubbleView () |
| +@property(nonatomic, readonly, weak) UILabel* label; |
|
edchin
2017/07/07 04:24:10
Remove readonly. You'll want to be able to set it.
gchatz
2017/07/07 04:29:10
Need comment here too.
helenlyang
2017/07/07 23:29:16
My reasoning was that we want to modify the text,
gchatz
2017/07/08 00:39:48
Overall with the label in NumberBadgeView, here is
|
| +@end |
| + |
| +@implementation BubbleView |
| + |
| +@synthesize arrowDirection = _arrowDirection; |
| +@synthesize alignment = _alignment; |
| +@synthesize label = _label; |
| + |
| +- (instancetype)initWithText:(NSString*)text |
| + direction:(BubbleArrowDirection)arrowDirection |
| + alignment:(BubbleAlignment)alignment { |
| + self = [super initWithFrame:CGRectZero]; |
| + return self; |
| +} |
| + |
|
edchin
2017/07/07 04:24:10
Add this line to document this section:
#pragma ma
helenlyang
2017/07/07 23:29:15
Done.
|
| +- (CGSize)sizeThatFits:(CGSize)size { |
|
gchatz
2017/07/07 04:29:10
Should have comment explaining why override is hap
helenlyang
2017/07/07 23:29:15
Done.
|
| + return CGSizeZero; |
| +} |
| + |
| +@end |