Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: remoting/ios/app/remoting_view_controller.mm

Issue 2916003002: [CRD iOS] Fix shadow between host cards and use anchor constraints (Closed)
Patch Set: Use self.contentView and add ASCII art Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « remoting/ios/app/host_collection_view_controller.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/remoting_view_controller.h" 9 #import "remoting/ios/app/remoting_view_controller.h"
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 // TODO(nicholss): Localize this file. 44 // TODO(nicholss): Localize this file.
45 // TODO(nicholss): This file is not finished with integration, the app flow is 45 // TODO(nicholss): This file is not finished with integration, the app flow is
46 // still pending development. 46 // still pending development.
47 47
48 @implementation RemotingViewController 48 @implementation RemotingViewController
49 49
50 - (instancetype)init { 50 - (instancetype)init {
51 _isAuthenticated = NO; 51 _isAuthenticated = NO;
52 UICollectionViewFlowLayout* layout = 52 UICollectionViewFlowLayout* layout =
53 [[UICollectionViewFlowLayout alloc] init]; 53 [[MDCCollectionViewFlowLayout alloc] init];
54 layout.minimumInteritemSpacing = 0; 54 layout.minimumInteritemSpacing = 0;
55 CGFloat sectionInset = kHostInset * 2.f; 55 CGFloat sectionInset = kHostInset * 2.f;
56 [layout setSectionInset:UIEdgeInsetsMake(sectionInset, sectionInset, 56 [layout setSectionInset:UIEdgeInsetsMake(sectionInset, sectionInset,
57 sectionInset, sectionInset)]; 57 sectionInset, sectionInset)];
58 HostCollectionViewController* collectionVC = [ 58 HostCollectionViewController* collectionVC = [
59 [HostCollectionViewController alloc] initWithCollectionViewLayout:layout]; 59 [HostCollectionViewController alloc] initWithCollectionViewLayout:layout];
60 self = [super initWithContentViewController:collectionVC]; 60 self = [super initWithContentViewController:collectionVC];
61 if (self) { 61 if (self) {
62 _remotingService = [RemotingService SharedInstance]; 62 _remotingService = [RemotingService SharedInstance];
63 63
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 MDCSnackbarMessage* message = [[MDCSnackbarMessage alloc] init]; 288 MDCSnackbarMessage* message = [[MDCSnackbarMessage alloc] init];
289 if (_isAuthenticated) { 289 if (_isAuthenticated) {
290 message.text = [NSString 290 message.text = [NSString
291 stringWithFormat:@"Currently signed in as %@.", 291 stringWithFormat:@"Currently signed in as %@.",
292 _remotingService.authentication.user.userEmail]; 292 _remotingService.authentication.user.userEmail];
293 [MDCSnackbarManager showMessage:message]; 293 [MDCSnackbarManager showMessage:message];
294 } 294 }
295 } 295 }
296 296
297 @end 297 @end
OLDNEW
« no previous file with comments | « remoting/ios/app/host_collection_view_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698