开发者

IB suvbiews think i'm in portrait even though IB is in landscape

I'm a bit confused and frustrated why Image Views (and UIViews) that I drag onto the IB are always re-sizing and re-positioning themselves rather than get added with the parameters of the IB itself. For example, I have in the IB Attributes window under "Simulated User Interface Elements", changed "Orientation" to "Landscape" and "Status Bar" to "Unspecified" and it's all working like a charm: the IB displays in Xcode as landscape.

But if I drag开发者_运维百科 an Image View onto the IB, it is automatically using the resizing rules of its Size Inspector, as if it expects its "normal" position and size to be Portrait. So as an extra step that seems unnecessary, I have to manipulate the sizing rules for everything I add to IB. Is there an easy way around this, or do we just assume that dragged items onto IB will always consider Portrait as their main orientation.


IB has no customizable default settings that are applied for new objects, so you will have to define the resizing property for each new element you add. Therefore, in a sense, is like you say, that orientation is by default portrait.

On the other hand, if you do not define the resizing property in IB for Cocoa apps, the layout will not work for any resize of the window; with iOS, things seem to work properly because there is no resize possible, by default. What I am trying to say here is that, in general, it is pretty normal to have to define the resizing property for new elements in IB.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜