File tree Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Expand file tree Collapse file tree 2 files changed +6
-11
lines changed Original file line number Diff line number Diff line change 8
8
9
9
#import < UIKit/UIKit.h>
10
10
11
-
12
- @interface RKTwitterAppDelegate : NSObject <UIApplicationDelegate> {
13
- }
14
-
11
+ @interface RKTwitterAppDelegate : UIResponder <UIApplicationDelegate>
15
12
@end
16
-
Original file line number Diff line number Diff line change 14
14
15
15
@implementation RKTwitterAppDelegate
16
16
17
+ @synthesize window;
18
+
17
19
#pragma mark -
18
20
#pragma mark Application lifecycle
19
21
@@ -33,7 +35,6 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
33
35
34
36
// Initialize RestKit
35
37
RKObjectManager *objectManager = [[RKObjectManager alloc ] initWithHTTPClient: client];
36
-
37
38
38
39
// Setup our object mappings
39
40
RKObjectMapping *userMapping = [RKObjectMapping mappingForClass: [RKTUser class ]];
@@ -71,13 +72,11 @@ - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(
71
72
// Create Window and View Controllers
72
73
RKTwitterViewController *viewController = [[RKTwitterViewController alloc ] initWithNibName: nil bundle: nil ];
73
74
UINavigationController *controller = [[UINavigationController alloc ] initWithRootViewController: viewController];
74
- UIWindow * window = [[UIWindow alloc ] initWithFrame: CGRectMake (0 , 0 , 320 , 480 )];
75
- [ window addSubview: controller.view] ;
76
- [window makeKeyAndVisible ];
75
+ self. window = [[UIWindow alloc ] initWithFrame: CGRectMake (0 , 0 , 320 , 480 )];
76
+ self. window . rootViewController = controller;
77
+ [self . window makeKeyAndVisible ];
77
78
78
79
return YES ;
79
80
}
80
81
81
-
82
-
83
82
@end
You can’t perform that action at this time.
0 commit comments