Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --this is in appdelegate
- - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
- {
- self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
- // Override point for customization after application launch.
- UIViewController *viewController1 = [[HomeViewController alloc] initWithNibName:@"HomeViewController" bundle:nil];
- UIViewController *viewController2 = [[InformViewController alloc] initWithNibName:@"InformViewController" bundle:nil];
- UIViewController *viewController3 = [[HelpViewController alloc] initWithNibName:@"HelpViewController" bundle:nil];
- self.tabBarController = [[UITabBarController alloc] init];
- self.tabBarController.viewControllers = @[viewController1, viewController2, viewController3];
- self.window.rootViewController = self.tabBarController;
- [self.window makeKeyAndVisible];
- return YES;
- --this opens the new view called beta
- @implementation HomeViewController
- -(IBAction)Showbeta
- {
- betaViewController *betaViewController = [[betaViewController alloc] initWithNibName:nil bundle:nil];
- [self presentViewController:betaViewController animated:YES completion:NULL];
- }
- --this is in betaviewcontroller
- @interface betaViewController ()
- @end
- @implementation betaViewController
- - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
- {
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
- if (self) {
- // Custom initialization
- // self.window.rootViewController = self.tabBarController; --> this did not work
- }
- return self;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement