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 7634357
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:09:09+00:00 2026-05-31T07:09:09+00:00

I am, in all basics, wanting to have a view for iPhones, and one

  • 0

I am, in all basics, wanting to have a view for iPhones, and one for iPads. However, I want to use the same view controllers for both of them, since they are the same thing, just optimized for each device.

I know it’s possible to do this, because it is a universal app and the default views for a universal project include one main view for iPhones, and one main view for iPads. However, they’re implemented automatically and so I don’t know how to replicate this.

So, the jist of this question is: How do you have two xibs connected to one viewcontroller?

Thanks,

  • Jake
  • 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-05-31T07:09:10+00:00Added an answer on May 31, 2026 at 7:09 am

    in code.. wherever you lot the new view ..do like this

    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)
    {
                self.MainView = [[[YOurViewController alloc] initWithNibName:@"YOurViewController_iPad" bundle:nil]autorelease];
    
    }
    else
    {
        self.MainView = [[[YOurViewController alloc] initWithNibName:@"YOurViewController_iPhone" bundle:nil]autorelease];
    }
    

    You will have to replace the nib name and class name with yours..

    Above that…one more important step is to go in each xib file..click on File Owner.. and in the i*dentity inspector* (icons on the top right side) .. make sure it is of class YOurViewController

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

Sidebar

Related Questions

I have the most basic jquery function of them all, but I couldn't find
Historically I've been completely against using ORMS for all but the most basics applications.
All, I have a basic Windows 7 Phone application and I have just finished
Pretty much all the apps I use on a regular basis implement this 'seemly
I have a website that has around 10 pages. Only one of those pages
Trying to run the basic examples given by playn, wanting to have a go
I have a hierarchy of classes that all derive from a base type and
I'm wanting to make a CoreData entity called Employees, some Employees could have a
I need to write an ActiveX control and have never written one before. I'd
I have recently started learning C++ and I thought I have covered learning all

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.