Skip to content

Commit cb170b3

Browse files
committed
Add RootViewController.
1 parent 7afbb65 commit cb170b3

File tree

5 files changed

+73
-2
lines changed

5 files changed

+73
-2
lines changed

WebAppWrapper.xcodeproj/project.pbxproj

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
FA68567A174CD862001C8F42 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = FA685679174CD862001C8F42 /* Default.png */; };
1717
FA68567C174CD862001C8F42 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FA68567B174CD862001C8F42 /* Default@2x.png */; };
1818
FA68567E174CD862001C8F42 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = FA68567D174CD862001C8F42 /* Default-568h@2x.png */; };
19+
FA685687174CD870001C8F42 /* RootViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = FA685686174CD870001C8F42 /* RootViewController.m */; };
1920
/* End PBXBuildFile section */
2021

2122
/* Begin PBXFileReference section */
@@ -32,6 +33,8 @@
3233
FA685679174CD862001C8F42 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = "<group>"; };
3334
FA68567B174CD862001C8F42 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = "<group>"; };
3435
FA68567D174CD862001C8F42 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
36+
FA685685174CD870001C8F42 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = "<group>"; };
37+
FA685686174CD870001C8F42 /* RootViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RootViewController.m; sourceTree = "<group>"; };
3538
/* End PBXFileReference section */
3639

3740
/* Begin PBXFrameworksBuildPhase section */
@@ -78,6 +81,7 @@
7881
FA68566D174CD862001C8F42 /* WebAppWrapper */ = {
7982
isa = PBXGroup;
8083
children = (
84+
FA685684174CD866001C8F42 /* View Controllers */,
8185
FA685676174CD862001C8F42 /* AppDelegate.h */,
8286
FA685677174CD862001C8F42 /* AppDelegate.m */,
8387
FA68566E174CD862001C8F42 /* Supporting Files */,
@@ -99,6 +103,15 @@
99103
name = "Supporting Files";
100104
sourceTree = "<group>";
101105
};
106+
FA685684174CD866001C8F42 /* View Controllers */ = {
107+
isa = PBXGroup;
108+
children = (
109+
FA685685174CD870001C8F42 /* RootViewController.h */,
110+
FA685686174CD870001C8F42 /* RootViewController.m */,
111+
);
112+
name = "View Controllers";
113+
sourceTree = "<group>";
114+
};
102115
/* End PBXGroup section */
103116

104117
/* Begin PBXNativeTarget section */
@@ -166,6 +179,7 @@
166179
files = (
167180
FA685674174CD862001C8F42 /* main.m in Sources */,
168181
FA685678174CD862001C8F42 /* AppDelegate.m in Sources */,
182+
FA685687174CD870001C8F42 /* RootViewController.m in Sources */,
169183
);
170184
runOnlyForDeploymentPostprocessing = 0;
171185
};

WebAppWrapper/AppDelegate.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
//
88

99
#import <UIKit/UIKit.h>
10+
#import "RootViewController.h"
1011

1112
@interface AppDelegate : UIResponder <UIApplicationDelegate>
1213

13-
@property (strong, nonatomic) UIWindow *window;
14+
@property (nonatomic, strong) UIWindow *window;
15+
@property (nonatomic, strong) RootViewController *rootViewController;
1416

1517
@end

WebAppWrapper/AppDelegate.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ @implementation AppDelegate
1313
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
1414
{
1515
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
16-
// Override point for customization after application launch.
16+
17+
RootViewController *rootViewController = [[RootViewController alloc] init];
18+
self.rootViewController = rootViewController;
19+
self.window.rootViewController = rootViewController;
20+
1721
self.window.backgroundColor = [UIColor whiteColor];
1822
[self.window makeKeyAndVisible];
1923
return YES;

WebAppWrapper/RootViewController.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
//
2+
// RootViewController.h
3+
// WebAppWrapper
4+
//
5+
// Created by Alex Rezit on 22/05/2013.
6+
// Copyright (c) 2013 Seymour Dev. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
@interface RootViewController : UIViewController
12+
13+
@end

WebAppWrapper/RootViewController.m

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
//
2+
// RootViewController.m
3+
// WebAppWrapper
4+
//
5+
// Created by Alex Rezit on 22/05/2013.
6+
// Copyright (c) 2013 Seymour Dev. All rights reserved.
7+
//
8+
9+
#import "RootViewController.h"
10+
11+
@interface RootViewController ()
12+
13+
@end
14+
15+
@implementation RootViewController
16+
17+
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
18+
{
19+
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
20+
if (self) {
21+
// Custom initialization
22+
}
23+
return self;
24+
}
25+
26+
- (void)viewDidLoad
27+
{
28+
[super viewDidLoad];
29+
// Do any additional setup after loading the view.
30+
}
31+
32+
- (void)didReceiveMemoryWarning
33+
{
34+
[super didReceiveMemoryWarning];
35+
// Dispose of any resources that can be recreated.
36+
}
37+
38+
@end

0 commit comments

Comments
 (0)