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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:36:34+00:00 2026-06-12T06:36:34+00:00

I made a nib for each viewController with family iPhone in the selection the

  • 0

I made a nib for each viewController with family “iPhone” in the selection the GUI wizard offers. I have it working on iPad & iPhone (without separate iPad nibs) because I can’t be bothered and I don’t see the point. I’d rather just have one nib for all (especially now that the new iPhone 5 is out (with a different screen size).

On one of my pages on iPad the view is left aligned and the size of an iPhone (because of family : iPhone). What is the best way to get these nibs working on both? Do I need to reset the frame.width & frame.height after I have init’d my viewControlers? I.E by setting it to something like window.width?

EDIT:What I’ve come up with is below, is this going to be safe code?

In every viewDidLoad method on every VC I will do this:

self.view.frame = [[UIScreen mainScreen] bounds];
  • 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-12T06:36:36+00:00Added an answer on June 12, 2026 at 6:36 am

    The best way to use one xib/nib file for iPhone and iPad interfaces it is set appropriate autoresing masks of your UIViews AppleDocs:

    An integer bit mask that determines how the receiver resizes itself when its superview’s bounds change.

    In iOS 6 it is now released new method to make autoresing:

    Use layout constraints to automatically position the views (iOS 6 and later). You override updateViewConstraints to add any necessary layout constraints not already configured by the views. Your implementation of this method must call [super updateViewConstraints].

    You could try to find more information here: Cocoa Auto Layout Guide

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

Sidebar

Related Questions

Working on iphone splash screen, I have made custom animation with the help of
I made a universal application that contains NIB files for both ipad and iphone
I have a UITableview made up with a custom cell loaded from a nib.
I have made an iPhone app with localized versions. It mostly works fine, but
I have a RootViewController & it's associated nib or xib file. This nib is
I have a test app for iOS that is built without any nib/xib files.
I have a nib file for a UITableViewCell subclass I made, it's height is
I have a UILabel, which I made using the nib. To my code I
I am working on an iPhone project which I have translated to two languages
Please help me, I never made universal UIViewControllers with xib for iPhone/iPad. How I

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.