Ø (14)Programatically
set rootview controller
DemoDelegate.h
@class second;
@property (strong, nonatomic) second *s;
DemoDelegate.m
#import "second.h"
@synthesize s;
- (BOOL)application:(UIApplication *)application
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window =
[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// Override point
for customization after application launch.
self.window.backgroundColor = [UIColor whiteColor];
[self.window
makeKeyAndVisible];
s = [[second
alloc]initWithNibName:@"second" bundle:nil];
self.window.rootViewController = s;
return YES;
}
No comments:
Post a Comment