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

Side by Side Diff: ios/crnet/crnet_consumer/crnet_consumer_view_controller.m

Issue 1125293004: ios: add CrNet (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
OLDNEW
(Empty)
1 // Copyright 2014 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 "crnet_consumer_view_controller.h"
6 #import "CrNet.h"
7
8 @implementation CrNetConsumerViewController {
9 UIWebView* _webView;
10 }
11
12 - (void)viewDidLoad {
13 self.view.backgroundColor = [UIColor whiteColor];
14
15 UIButton* google = [UIButton buttonWithType:UIButtonTypeSystem];
16 [google setTitle:@"google.com" forState:UIControlStateNormal];
17 [google setFrame:CGRectMake(5, 0, 95, 50)];
18 [google addTarget:self
19 action:@selector(loadGoogle)
20 forControlEvents:UIControlEventTouchUpInside];
21 [self.view addSubview:google];
22
23 _webView = [[UIWebView alloc]
24 initWithFrame:CGRectMake(0,
25 52,
26 self.view.bounds.size.width,
27 self.view.bounds.size.height - 52)];
28 [self.view addSubview:_webView];
29 _webView.autoresizingMask = UIViewAutoresizingFlexibleWidth |
30 UIViewAutoresizingFlexibleHeight;
31
32 [self loadGoogle];
33 }
34
35 // Disable the status bar to sidestep all the iOS7 status bar issues.
36 - (BOOL)prefersStatusBarHidden {
37 return YES;
38 }
39
40 - (void)loadGoogle {
41 [_webView loadRequest:[NSURLRequest requestWithURL:
42 [NSURL URLWithString:@"https://www.google.com"]]];
stuartmorgan 2015/05/19 17:39:36 Fix indentation; should just be 4 relative to the
Elly Fong-Jones 2015/05/20 22:02:26 Done.
43
stuartmorgan 2015/05/19 17:39:36 Remove the blank line.
Elly Fong-Jones 2015/05/20 22:02:26 Done.
44 }
45
46 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698