JAHelia
JAHelia

Reputation: 7922

Incorrect Master View Size in storyboard (portrait only)

I have an iPad app designed using storyboard, the MasterViewController simulated metrics are as follows:

enter image description here

and the view size as it appears in the size inspector is as follows:

enter image description here

when I NSLogged the view's frame in viewWillAppear method of the MasterViewController (named here HomeViewController), the result was: {{0, 0}, {320, 1004}}

that means the actual height of the master view is 1004 pixels and not 832 pixels.

why does Simulated Metrics in Xcode gives me incorrect master view height ?

-Notes before you answer the question:

  1. when I choose the orientation (in Simulated Metrics) to be Landscape, then the Master View's height would be 748 (in the size inspector) which matches the actual height when I run the app.
  2. I know that FreeForm option in simulated metrics can resize the view to whatever I want, but each predefined size in the simulated metrics MUST give me the correct view size so I can design the view without ambiguity.
  3. Xcode version is 4.6.2 and iOS simulator (iPAD) version is 6.1

Upvotes: 0

Views: 271

Answers (1)

RonLugge
RonLugge

Reputation: 5174

I know this is an old question, but it came up when I was trying to search for the proper size of a 'master' view, so... What the heck.

At a guess, this is related to the fact that both detail and master view have different sizes / shapes depending on orientation. You'd think that apple would give the master view a width such that when you move into portrait orientation, the detail view's width is unchanged, but experience suggests otherwise.

Upvotes: 1

Related Questions