Storyboard elements are not sized properly on the device
Posted
by
Joel Fischer
on Stack Overflow
See other posts from Stack Overflow
or by Joel Fischer
Published on 2012-12-17T23:02:08Z
Indexed on
2012/12/17
23:02 UTC
Read the original article
Hit count: 407
In the storyboard, I am placing a table view element into a subclassed UIView. The element is not appearing on the iPad device I am running it on the same as it appears in the storyboard however. This also happens for additional content that I place into the storyboard. Below is a screenshot as it appears in the storyboard, as well as UI width/height information.
And here is the description of the UI file running on the iPad.
https://gist.github.com/4323186 (embedding it directly into the post is giving me problems)
You'll notice that the tableview is explicitly set at 178 width, and is showing up in the description as 276 width. My initial thought was that perhaps a cell was forcing the parent to be larger (I'm very new to iOS UI development), but drilling into that shows the prototype cell it appears that the width is defined by it's parent at 178. The image views and label also are appearing in the incorrect spot, as shown in the second image below.
© Stack Overflow or respective owner