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

  • Home
  • SEARCH
  • 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 4045504
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T13:26:14+00:00 2026-05-20T13:26:14+00:00

I have a universal iPhone/iPad app. On the main menu I have a UIImage

  • 0

I have a universal iPhone/iPad app. On the main menu I have a UIImage and UILabel that show the current weather conditions outside; the UILabel shows the current temperature.

I am using the same XIB for both versions, I made all of the graphics I am using a high resolution so they scale good for the iPad.

On the iPhone version, right under the UIImage the label is centered, which is what I want it to do. When it loads in the iPad, the UIImage gets a big bigger, but the label stays in the same position, to the left of the screen, not centered under the bigger image. I have tried many different things in IB to get it to center, and I cannot get it to.

Would it also be possible to make the text size bigger when loaded on the iPad?

Here are some images to portray what I am talking about:

iPhone version:
http://img855.imageshack.us/i/iphonei.png/

iPad version:
http://img163.imageshack.us/i/ipadh.png/

  • 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-20T13:26:14+00:00Added an answer on May 20, 2026 at 1:26 pm

    Not sure about your label issue, but to vary text size for iPad create a function to test if you’re on an iPad and then use that to vary your code as required. Here’s a function to to do the job.

    BOOL isIPad()
    {
        if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPad)
        {
            return YES;
        }
        return NO;
    }
    

    And then just write some conditional code. For example:

    UIButton *infoCircle;
    
        if (isIPad())
        {
            infoCircle =  [UIButton buttonWithType:UIButtonTypeInfoDark];
        }
        else
        {
            infoCircle =  [UIButton buttonWithType:UIButtonTypeInfoLight];
        }
    

    In your case, you’ll want to adjust the label font size with something like:

    if (isIPad())
    {
          [[self mainLabel] setFont: [UIFont systemFontOfSize: 18.0]];
    }
    else
    {
          [[self mainLabel] setFont: [UIFont systemFontOfSize: 14.0]];
    }
    

    If Interface Builder is giving you grief, you can also use the same approach to reposition the UILabel programmatically. Sometimes this is quicker, especially once your interface has settled down.

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

Sidebar

Related Questions

I have a iPhone/iPad app (universal binary) with a regular UIWebView that displays webpages
I have a Core Data app that will end up being an iPhone/iPad universal
Convert iPad application to iPhone- Universal app. I already have one iPad application, now
I have written a universal app that's working fine on both iPhone (iPod Touch)
In a universal binary iPhone/iPad app of mine, users are able to adjust preferences
I have an opengl game for iPhone/iPad (universal). I added the ability to send
I have an iPhone app that I would like to port over to the
I have built a universal app. I have assets that are for both but
So I'm making a universal app (iphone3gs/iphone4/ipad/)... But I have a question about images.
I am building a universal app that uses a UISplitViewController for the iPad, and

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.