Chromium Code Reviews| Index: ios/showcase/text_badge_view/sc_text_badge_view_controller.mm |
| diff --git a/ios/showcase/text_badge_view/sc_text_badge_view_controller.mm b/ios/showcase/text_badge_view/sc_text_badge_view_controller.mm |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..d27d33353b1014cc4d36ef91f2c9c9fa0078aa6f |
| --- /dev/null |
| +++ b/ios/showcase/text_badge_view/sc_text_badge_view_controller.mm |
| @@ -0,0 +1,23 @@ |
| +// 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/showcase/text_badge_view/sc_text_badge_view_controller.h" |
| + |
| +#import "ios/chrome/browser/ui/reading_list/text_badge_view.h" |
| + |
| +#if !defined(__has_feature) || !__has_feature(objc_arc) |
| +#error "This file requires ARC support." |
| +#endif |
| + |
| +@implementation TextBadgeViewController |
| + |
| +- (void)viewDidLoad { |
| + [super viewDidLoad]; |
| + self.view.backgroundColor = [UIColor grayColor]; |
| + TextBadgeView* textBadge = [[TextBadgeView alloc] initWithText:@"TEXT"]; |
| + [self.view addSubview:textBadge]; |
| + textBadge.frame = CGRectMake(0.0f, 0.0f, 100.0f, 100.0f); |
|
edchin
2017/07/07 21:00:09
It's a good idea to offset from the edges a little
helenlyang
2017/07/07 23:53:00
I've modified this so textBadge is centered on its
|
| +} |
| + |
| +@end |