From d02256dc49356e6dc1769cc0fb4737a7f013cbed Mon Sep 17 00:00:00 2001
From: Teddy Wing
Date: Sat, 29 Sep 2012 14:35:29 -0400
Subject: Got RootViewController to show a UIWebView containing the sample
Google Maps API site.
---
Classes/RootViewController.m | 10 +++---
Classes/RootViewController.xib | 75 ++++++++++++++++++++----------------------
iPhone/AppDelegate_iPhone.m | 2 +-
3 files changed, 42 insertions(+), 45 deletions(-)
diff --git a/Classes/RootViewController.m b/Classes/RootViewController.m
index 47124a2..053242c 100644
--- a/Classes/RootViewController.m
+++ b/Classes/RootViewController.m
@@ -13,22 +13,24 @@
@synthesize webView = _webView;
-
+/*
// The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad.
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) {
- [webView loadHTMLString:@"https://google-developers.appspot.com/maps/documentation/javascript/examples/map-simple" baseURL:[NSURL URLWithString:@""]];
+
}
return self;
}
+*/
-/*
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
+
+ [self.webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"https://google-developers.appspot.com/maps/documentation/javascript/examples/map-simple"]]];
}
-*/
+
/*
// Override to allow orientations other than the default portrait orientation.
diff --git a/Classes/RootViewController.xib b/Classes/RootViewController.xib
index bc3b3bb..98173d0 100644
--- a/Classes/RootViewController.xib
+++ b/Classes/RootViewController.xib
@@ -12,7 +12,7 @@
@@ -212,6 +196,17 @@
RootViewController
UIViewController
+
+ webView
+ UIWebView
+
+
+ webView
+
+ webView
+ UIWebView
+
+
IBProjectSource
Classes/RootViewController.h
@@ -306,7 +301,7 @@
NSObject
-
+
IBFrameworkSource
UIKit.framework/Headers/UIResponder.h
@@ -322,7 +317,7 @@
UIResponder
NSObject
-
+
UISearchBar
diff --git a/iPhone/AppDelegate_iPhone.m b/iPhone/AppDelegate_iPhone.m
index 6d9816e..566b8cd 100644
--- a/iPhone/AppDelegate_iPhone.m
+++ b/iPhone/AppDelegate_iPhone.m
@@ -20,7 +20,7 @@
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
// Override point for customization after application launch.
- RootViewController *rootVC = [[RootViewController alloc] init];
+ RootViewController *rootVC = [[RootViewController alloc] initWithNibName:@"RootViewController" bundle:nil];
[window setRootViewController:rootVC];
[window makeKeyAndVisible];
--
cgit v1.2.3