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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:12:15+00:00 2026-06-13T09:12:15+00:00

Why is Ipad simulator in XCode 4.5.1 shows wrong size when checking out programatically?

  • 0

Why is Ipad simulator in XCode 4.5.1 shows wrong size when checking out programatically?

MainViewController.m

- (void)viewDidLoad{
    [super viewDidLoad];

    [self.view setBackgroundColor:[UIColor redColor]];

    NSLog(@"self.view width : %f",self.view.frame.size.width);
    NSLog(@"self.view height : %f", self.view.frame.size.height);

    mTextView  =   [[UITextView alloc] initWithFrame:CGRectMake(10.0, 10.0, self.view.frame.size.width - 20, self.view.frame.size.height/2)];
    [self.view addSubview:mTextView];
}

and I am getting output as

self.view width : 320.000000
self.view height : 548.000000

My project specification

  1. Universal project
  2. targeting iOS 6.0
  3. I am absolutely certain that I checked “targeted for ipad”
    checkbox when creating MainViewController
  4. Dont know whether it is important, but “with xib for user interface”
    was unchecked.

And here is a screen shot with a textview is added

enter image description here

  • 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-13T09:12:16+00:00Added an answer on June 13, 2026 at 9:12 am

    Try waiting until:

    - (void)viewWillAppear
    

    before setting the frame of your UITextView. According to this post you won’t have valid geometry for your view before then.

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

Sidebar

Related Questions

i have installed xcode 4.2. In toolbar, schemes section, shows only iPhone/iPad 5.0 simulator.
I am working on an IPad app in xcode. In the IPad simulator, I
I am trying to install firebug lite in my iPad simulator but i could
i've installed new sdk 3.2 pre-release wich have iPad simulator, i have tried to
Its working perfectly in the iphone simulator. But not in the ipad simulator. I
I'm working on a UINavigationController driven iPad app (testing in the simulator). There are
I want to take retina iPad screenshots using the simulator, but because it's bigger
I'm trying to get a copy of the iOS simulator that includes an iPad
Seems like a basic question but I just can't figure it out: xcode 5.0
When I open an existing iPad project in Xcode and Build and Run it,

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.