incubator-callback-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaz...@apache.org
Subject ios commit: Implemented CB-536 - Add new selector to CDVViewController to create a new CDVCordovaView, so subclasses can override it
Date Wed, 18 Apr 2012 08:06:15 GMT
Updated Branches:
  refs/heads/master e9f076014 -> c532cfb67


Implemented CB-536 - Add new selector to CDVViewController to create a new CDVCordovaView,
so subclasses can override it


Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/commit/c532cfb6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/c532cfb6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/c532cfb6

Branch: refs/heads/master
Commit: c532cfb67e89ebb193e94e0806ad5202e031f8af
Parents: e9f0760
Author: Shazron Abdullah <shazron@apache.org>
Authored: Wed Apr 18 01:05:44 2012 -0700
Committer: Shazron Abdullah <shazron@apache.org>
Committed: Wed Apr 18 01:05:44 2012 -0700

----------------------------------------------------------------------
 .../Classes/MainViewController.m                   |    8 ++++++++
 CordovaLib/Classes/CDVViewController.h             |    1 +
 CordovaLib/Classes/CDVViewController.m             |    7 ++++++-
 3 files changed, 15 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/c532cfb6/Cordova-based Application/Classes/MainViewController.m
----------------------------------------------------------------------
diff --git a/Cordova-based Application/Classes/MainViewController.m b/Cordova-based Application/Classes/MainViewController.m
index 5e12f6d..47a0d39 100644
--- a/Cordova-based Application/Classes/MainViewController.m	
+++ b/Cordova-based Application/Classes/MainViewController.m	
@@ -69,6 +69,14 @@
 
 /* Comment out the block below to over-ride */
 /*
+- (CDVCordovaView*) newCordovaViewWithFrame:(CGRect)bounds
+{
+    return[super newCordovaViewWithFrame:bounds];
+}
+*/
+
+/* Comment out the block below to over-ride */
+/*
 #pragma CDVCommandDelegate implementation
 
 - (id) getCommandInstance:(NSString*)className

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/c532cfb6/CordovaLib/Classes/CDVViewController.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.h b/CordovaLib/Classes/CDVViewController.h
index 155be8c..55b207f 100644
--- a/CordovaLib/Classes/CDVViewController.h
+++ b/CordovaLib/Classes/CDVViewController.h
@@ -53,6 +53,7 @@
 
 - (void) printMultitaskingInfo;
 - (void) createGapView;
+- (CDVCordovaView*) newCordovaViewWithFrame:(CGRect)bounds;
 
 - (int) executeQueuedCommands;
 - (void) flushCommandQueue;

http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/c532cfb6/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index fa2c006..c3de36a 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -313,6 +313,11 @@
     }
 }
 
+- (CDVCordovaView*) newCordovaViewWithFrame:(CGRect)bounds
+{
+    return [[CDVCordovaView alloc] initWithFrame:bounds];
+}
+
 - (void) createGapView
 {
     CGRect webViewBounds = self.view.bounds;
@@ -320,7 +325,7 @@
 	
     if (!self.webView) 
 	{
-        self.webView = [[ [ CDVCordovaView alloc ] initWithFrame:webViewBounds] autorelease];
+        self.webView = [[self newCordovaViewWithFrame:webViewBounds] autorelease];
 		self.webView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
 		
 		[self.view addSubview:self.webView];


Mime
View raw message