You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by sh...@apache.org on 2012/05/23 00:46:20 UTC
ios commit: Fixes CB-818 - Make CDVViewController also implement
initWithNibName
Updated Branches:
refs/heads/master 8be82b9a3 -> e416919f0
Fixes CB-818 - Make CDVViewController also implement initWithNibName
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/e416919f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/tree/e416919f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/diff/e416919f
Branch: refs/heads/master
Commit: e416919f0e95c754d3a83847c78b4ca4d009d0cf
Parents: 8be82b9
Author: Shazron Abdullah <sh...@apache.org>
Authored: Tue May 22 15:46:12 2012 -0700
Committer: Shazron Abdullah <sh...@apache.org>
Committed: Tue May 22 15:46:12 2012 -0700
----------------------------------------------------------------------
CordovaLib/Classes/CDVViewController.h | 1 -
CordovaLib/Classes/CDVViewController.m | 21 +++++++++++++++++----
2 files changed, 17 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/e416919f/CordovaLib/Classes/CDVViewController.h
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.h b/CordovaLib/Classes/CDVViewController.h
index 55b207f..6f6c842 100644
--- a/CordovaLib/Classes/CDVViewController.h
+++ b/CordovaLib/Classes/CDVViewController.h
@@ -59,7 +59,6 @@
- (void) flushCommandQueue;
- (void) javascriptAlert:(NSString*)text;
-//- (NSString*) pathForResource:(NSString*)resourcepath;
- (NSString*) appURLScheme;
- (NSDictionary*) deviceProperties;
http://git-wip-us.apache.org/repos/asf/incubator-cordova-ios/blob/e416919f/CordovaLib/Classes/CDVViewController.m
----------------------------------------------------------------------
diff --git a/CordovaLib/Classes/CDVViewController.m b/CordovaLib/Classes/CDVViewController.m
index f3114ce..f3cfe01 100644
--- a/CordovaLib/Classes/CDVViewController.m
+++ b/CordovaLib/Classes/CDVViewController.m
@@ -46,10 +46,10 @@
@synthesize imageView, activityView, useSplashScreen, commandDelegate;
@synthesize wwwFolderName, startPage, invokeString;
-- (id) init
+- (id) __init
{
- self = [super init];
- if (self != nil) {
+ if (self != nil)
+ {
[[UIDevice currentDevice] beginGeneratingDeviceOrientationNotifications];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receivedOrientationChange)
name:UIDeviceOrientationDidChangeNotification object:nil];
@@ -64,7 +64,7 @@
name:UIApplicationDidBecomeActiveNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(onAppDidEnterBackground:)
name:UIApplicationDidEnterBackgroundNotification object:nil];
-
+
self.commandDelegate = self;
self.wwwFolderName = @"www";
self.startPage = @"index.html";
@@ -72,9 +72,22 @@
[self printMultitaskingInfo];
}
+
return self;
}
+-(id) initWithNibName:(NSString*)nibNameOrNil bundle:(NSBundle*)nibBundleOrNil
+{
+ self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
+ return [self __init];
+}
+
+- (id) init
+{
+ self = [super init];
+ return [self __init];
+}
+
- (void) printMultitaskingInfo
{
UIDevice* device = [UIDevice currentDevice];