1

I have recently converted from Storyboard to XIB. Because I have a large number of views, and it is easier to work with XIBs over a git repository. (Also the app will now be available for iOS 4).

Now here is the code that I used to have, but I am wondering how I would achieve the same without Storyboard, but with XIBs:

UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:[NSBundle bundleForClass:[self class]]];
infoView *infoViewController = [storyboard instantiateViewControllerWithIdentifier:[defaults objectForKey:@"launchScreen"]];
infoViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentViewController:infoViewController animated:YES completion:nil];
Carina
  • 2,260
  • 2
  • 20
  • 45
Neil
  • 2,004
  • 3
  • 23
  • 48

1 Answers1

2

First,you should convert infoView from Storyboard to infoView.xib , and then :

    infoView *infoViewController = [[infoView alloc]initWithNibName:@"infoView" bundle:nil];
    infoViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
    [self presentViewController:infoViewController animated:YES completion:nil];
Carina
  • 2,260
  • 2
  • 20
  • 45