| 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 #if !defined(__has_feature) || !__has_feature(objc_arc) | 5 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 6 #error "This file requires ARC support." | 6 #error "This file requires ARC support." |
| 7 #endif | 7 #endif |
| 8 | 8 |
| 9 #import "remoting/ios/app/host_collection_view_controller.h" | 9 #import "remoting/ios/app/host_collection_view_controller.h" |
| 10 | 10 |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 [HostCollectionViewCell class])]; | 42 [HostCollectionViewCell class])]; |
| 43 } | 43 } |
| 44 return self; | 44 return self; |
| 45 } | 45 } |
| 46 | 46 |
| 47 #pragma mark - UIViewController | 47 #pragma mark - UIViewController |
| 48 | 48 |
| 49 - (void)viewDidLoad { | 49 - (void)viewDidLoad { |
| 50 [super viewDidLoad]; | 50 [super viewDidLoad]; |
| 51 self.styler.cellStyle = MDCCollectionViewCellStyleCard; | 51 self.styler.cellStyle = MDCCollectionViewCellStyleCard; |
| 52 self.styler.cellLayoutType = MDCCollectionViewCellLayoutTypeGrid; | 52 self.styler.cellLayoutType = MDCCollectionViewCellLayoutTypeList; |
| 53 self.styler.gridPadding = 0; | |
| 54 self.styler.gridColumnCount = 1; | |
| 55 } | 53 } |
| 56 | 54 |
| 57 - (void)viewWillTransitionToSize:(CGSize)size | 55 - (void)viewWillTransitionToSize:(CGSize)size |
| 58 withTransitionCoordinator: | 56 withTransitionCoordinator: |
| 59 (id<UIViewControllerTransitionCoordinator>)coordinator { | 57 (id<UIViewControllerTransitionCoordinator>)coordinator { |
| 60 [self.collectionView.collectionViewLayout invalidateLayout]; | 58 [self.collectionView.collectionViewLayout invalidateLayout]; |
| 61 } | 59 } |
| 62 | 60 |
| 63 - (void)viewWillAppear:(BOOL)animated { | 61 - (void)viewWillAppear:(BOOL)animated { |
| 64 [super viewWillAppear:animated]; | 62 [super viewWillAppear:animated]; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 // Use a custom shadow under the flexible header. | 141 // Use a custom shadow under the flexible header. |
| 144 MDCShadowLayer* shadowLayer = [MDCShadowLayer layer]; | 142 MDCShadowLayer* shadowLayer = [MDCShadowLayer layer]; |
| 145 [headerView setShadowLayer:shadowLayer | 143 [headerView setShadowLayer:shadowLayer |
| 146 intensityDidChangeBlock:^(CALayer* layer, CGFloat intensity) { | 144 intensityDidChangeBlock:^(CALayer* layer, CGFloat intensity) { |
| 147 CGFloat elevation = MDCShadowElevationAppBar * intensity; | 145 CGFloat elevation = MDCShadowElevationAppBar * intensity; |
| 148 [(MDCShadowLayer*)layer setElevation:elevation]; | 146 [(MDCShadowLayer*)layer setElevation:elevation]; |
| 149 }]; | 147 }]; |
| 150 } | 148 } |
| 151 | 149 |
| 152 @end | 150 @end |
| OLD | NEW |