OLD | NEW |
(Empty) | |
| 1 // Copyright 2012 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/browser/ui/tabs/tab_strip_view.h" |
| 6 |
| 7 @implementation TabStripView |
| 8 |
| 9 @synthesize layoutDelegate = layoutDelegate_; |
| 10 |
| 11 - (instancetype)initWithFrame:(CGRect)frame { |
| 12 if ((self = [super initWithFrame:frame])) { |
| 13 self.showsHorizontalScrollIndicator = NO; |
| 14 self.showsVerticalScrollIndicator = NO; |
| 15 } |
| 16 return self; |
| 17 } |
| 18 |
| 19 - (BOOL)touchesShouldCancelInContentView:(UIView*)view { |
| 20 // The default implementation returns YES for all views except for UIControls. |
| 21 // Override to return YES for UIControls as well. |
| 22 return YES; |
| 23 } |
| 24 |
| 25 - (void)layoutSubviews { |
| 26 [layoutDelegate_ layoutTabStripSubviews]; |
| 27 } |
| 28 |
| 29 - (void)traitCollectionDidChange:(UITraitCollection*)previousTraitCollection { |
| 30 [super traitCollectionDidChange:previousTraitCollection]; |
| 31 [layoutDelegate_ traitCollectionDidChange:previousTraitCollection]; |
| 32 } |
| 33 |
| 34 @end |
OLD | NEW |