Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8509915
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:33:46+00:00 2026-06-11T03:33:46+00:00

I am trying to convert a iphone app to universal app, here is my

  • 0

I am trying to convert a iphone app to universal app, here is my code

if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
        self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPhone" bundle:nil];

        //  self.viewController = [[SearchViewController alloc] initWithNibName:@"SearchViewController" bundle:nil];
        [self.window addSubview:self.viewController.view];
        [self.timer invalidate];
        self.timer = nil;
        self.timer = [NSTimer scheduledTimerWithTimeInterval: 3 target: self selector: @selector (pullnextview) userInfo: nil repeats: YES];
    } else {
        self.viewController = [[ViewController alloc] initWithNibName:@"ViewController_iPad" bundle:nil];
        [self.window addSubview:self.viewController.view];
        [self.timer invalidate];
        self.timer = nil;
        self.timer = [NSTimer scheduledTimerWithTimeInterval: 3 target: self selector: @selector (Ipadpullnextview) userInfo: nil repeats: YES];
    }

==================================================================================

-(void)pullnextview
{
    [self.viewController.view removeFromSuperview];
    [self.timer invalidate];
    self.timer = nil;
    NSArray *viewsArray;
    //create the first view controller

    SearchViewController *navController0 = [[SearchViewController alloc] initWithNibName:@"SearchViewController" bundle:nil];

    navController0.tabBarItem.image = [UIImage imageNamed:@"search.png"];
    [navController0 setTitle:@"Neuen Termin buchen"];

    //create the navigation controller and use NavRootController as its root
    UINavigationController *nav0 = [[UINavigationController alloc] initWithRootViewController:navController0];
    UINavigationController *nav;
    NSUserDefaults *standardUserDefaults = [NSUserDefaults standardUserDefaults];
    int uid = [standardUserDefaults integerForKey:@"dmloginid"];
    [standardUserDefaults synchronize];

    if(uid>0)
    {

        SearchViewController *navController = [[SearchViewController alloc] initWithNibName:@"SearchViewController" bundle:nil];
        navController.tabBarItem.image = [UIImage imageNamed:@"appointment.png"];
        [navController setTitle:@"Meine Termine"];
        nav = [[UINavigationController alloc] initWithRootViewController:navController];

    }
    else
    {
        LoginViewController *navController = [[LoginViewController alloc] initWithNibName:@"LoginViewController" bundle:nil];
        navController.tabBarItem.image = [UIImage imageNamed:@"appointment.png"];
        [navController setTitle:@"Meine Termine"];
        nav = [[UINavigationController alloc] initWithRootViewController:navController];

    }


    SettingsViewController *navController3 = [[SettingsViewController alloc] initWithNibName:@"SettingsViewController" bundle:nil];
    navController3.tabBarItem.image = [UIImage imageNamed:@"setting.png"];
    [navController3 setTitle:@"Einstellungen"];

    //create the navigation controller and use NavRootController as its root
    UINavigationController *nav3 = [[UINavigationController alloc] initWithRootViewController:navController3];
    viewsArray = [NSArray arrayWithObjects:nav0,nav,nav3, nil];
    UITabBarController *tabbarController = [[UITabBarController alloc] init];
    tabbarController.view.frame = CGRectMake(0,0,320,460);
    //then tell the tabbarcontroller to use our array of views
    [tabbarController setViewControllers:viewsArray];

    //then the last step is to add the our tabbarcontroller as subview of the window
    self.window.rootViewController = tabbarController;


}

-(void)Ipadpullnextview
{
    [self.viewController.view removeFromSuperview];
    [self.timer invalidate];
    self.timer = nil;
    NSArray *viewsArray;
    //create the first view controller

    SearchViewController *navController0 = [[SearchViewController alloc] initWithNibName:@"IpadSearchViewController" bundle:nil];

    navController0.tabBarItem.image = [UIImage imageNamed:@"search.png"];
    [navController0 setTitle:@"Neuen Termin buchen"];

    //create the navigation controller and use NavRootController as its root
    UINavigationController *nav0 = [[UINavigationController alloc] initWithRootViewController:navController0];
    UINavigationController *nav;
    NSUserDefaults *standardUserDefaults = [NSUserDefaults standardUserDefaults];
    int uid = [standardUserDefaults integerForKey:@"dmloginid"];
    [standardUserDefaults synchronize];

    if(uid>0)
    {

        SearchViewController *navController = [[SearchViewController alloc] initWithNibName:@"IpadSearchViewController" bundle:nil];
        navController.tabBarItem.image = [UIImage imageNamed:@"appointment.png"];
        [navController setTitle:@"Meine Termine"];
        nav = [[UINavigationController alloc] initWithRootViewController:navController];

    }
    else
    {
        LoginViewController *navController = [[LoginViewController alloc] initWithNibName:@"IpadLoginViewController" bundle:nil];
        navController.tabBarItem.image = [UIImage imageNamed:@"appointment.png"];
        [navController setTitle:@"Meine Termine"];
        nav = [[UINavigationController alloc] initWithRootViewController:navController];

    }


    SettingsViewController *navController3 = [[SettingsViewController alloc] initWithNibName:@"IpadSettingsViewController" bundle:nil];
    navController3.tabBarItem.image = [UIImage imageNamed:@"setting.png"];
    [navController3 setTitle:@"Einstellungen"];

    //create the navigation controller and use NavRootController as its root
    UINavigationController *nav3 = [[UINavigationController alloc] initWithRootViewController:navController3];
    viewsArray = [NSArray arrayWithObjects:nav0,nav,nav3, nil];
    UITabBarController *tabbarController = [[UITabBarController alloc] init];
    tabbarController.view.frame = CGRectMake(0,0,320,460);
    //then tell the tabbarcontroller to use our array of views
    [tabbarController setViewControllers:viewsArray];

    //then the last step is to add the our tabbarcontroller as subview of the window
    self.window.rootViewController = tabbarController;


}

==================================================================================

I am calling the two different function containing the same code but the .xib is different . After that when i went to run the code this error is coming.

==================================================================================

 *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "IpadSearchViewController" nib but the view outlet was not set.'

Can anyone help me. I am new in this section.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T03:33:48+00:00Added an answer on June 11, 2026 at 3:33 am

    Go to your IPad XIB and connnect the view outlet by right clicking the view and then connecting the referencing outlet of view to file owner..It shall work fine

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to convert my iPhone app to a universal app with the following
I am trying to convert my iPhone only application to a Universal application. I
I am trying to convert some Cocos2d-iphone code to Cocos2d-x code and could use
I've been making a simple painting app for the iphone. I'm trying to convert
I'm trying to convert this app i have from iPhone to iPad.. i've set
I am trying to convert code written in Openssl into the iphone’s built in
Trying to convert this c code into MIPS and run it in SPIM. int
I have an iPhone app that I'd like to convert to an iPad app.
I am working on an iPhone app and I am trying to make something
I am trying to encrypt/decrypt one field of SQLite3 database stored in iPhone app.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.