NativeUI icon indicating copy to clipboard operation
NativeUI copied to clipboard

How to open MainWindow.xib and remove MainStoryboard?

Open gaminilesh opened this issue 9 years ago • 0 comments

1.Your code is very good but i cant understand how to remove storyboard and add mainwindow.xib with navigationcontroller and tabbarcontroller. 2.And how to work native appdeleget file. please sir help me

screen shot 2016-02-19 at 11 51 58 am

pragma mark - Presenting Storyboard

-(void)showStoryboard:(NSString*)name { [self showStoryboard:name withAnimation:(UIModalTransitionStyle)-1]; }

-(void) showStoryboard:(NSString*)name withAnimation:(UIModalTransitionStyle)animation { // Pause Unity if (self.pauseOnShowUI) { [self pauseUnity:YES]; }

UIStoryboard *sb = [UIStoryboard storyboardWithName:name bundle:nil];
NSAssert(sb != nil, @"No storyboard found!");


UIViewController *controller = [sb instantiateInitialViewController];
NSAssert(controller != nil, @"Storyboard has no initial vew controller!");

if ([controller isKindOfClass:UINavigationController.class]) {
    _navigationController = (UINavigationController*)controller;
} else {
    NSLog(@"No nav controller");
}

self.viewWasAnimated = NO;
if (animation >= 0) {
    self.viewWasAnimated = YES;
    controller.modalTransitionStyle = animation;
}

UIWindow *window = [UIApplication sharedApplication].keyWindow;
[window.rootViewController presentViewController:controller animated:self.viewWasAnimated completion:nil];

NSLog(@"Presented Storyboard: %@", name);

}

How to replace this code to my mainwindow.xib

gaminilesh avatar Feb 19 '16 06:02 gaminilesh