Skip to content

Commit 4b3015a

Browse files
committed
xcode7 demo crash
1 parent 32e9a5d commit 4b3015a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

LKDBHelper/LKAppDelegate.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,14 @@ -(void)add:(NSString*)txt
3333
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
3434
{
3535
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
36+
self.window.rootViewController = [UIViewController new];
3637
// Override point for customization after application launch.
3738
self.ms = [NSMutableString string];
3839
UITextView* textview = [[UITextView alloc]init];
3940
textview.frame = CGRectMake(0, 20, 320, self.window.bounds.size.height);
4041
textview.textColor = [UIColor blackColor];
4142
textview.delegate =self;
42-
[self.window addSubview:textview];
43+
[self.window.rootViewController.view addSubview:textview];
4344
self.tv = textview;
4445
[self.window makeKeyAndVisible];
4546

0 commit comments

Comments
 (0)