开发者

No simulated metrics available for ViewControllers inside Tab Bar

开发者 https://www.devze.com 2023-04-13 08:43 出处:网络
Xcode won\'t let me use simulated metrics anymore, at least for View Controllers that have already been added to a Tab Bar.

Xcode won't let me use simulated metrics anymore, at least for View Controllers that have already been added to a Tab Bar.

My scenario is as follows:

We're talking about an app for iPhone. It has a Tab Bar, inside the Tab Bar there are several Navigation Controllers. Those have standard View Controllers set as their root View Controllers. The navigation bar is enabled for these Navigation Controllers.

If I build and run, the navigation bars will appear, yet Xcode won't show them in interface builder. And the simulated metrics rollout is not available, meaning it's just not present.

Now, if I take one of the View Controllers and drag it out of the hierarchy, the simulated metrics rollout becomes available and the navigation bar is visible too (if selected in simulated metrics).

I've done this kind of setup like a thousand times and I never had this problem, but I can't tell at which point it changed because I hardly did any interface stuff since Xcode 4.0. My current version of Xcode is 4.2.

The problem persists even when restarting Xcode and starting a new project.

Any help greatly appreciated开发者_Python百科!

Update:

The Tab Bar itself still offers simulated metrics, and when I enable the navigation bar there, its children VCs will "inherit" it and show it, too. This is only of little help though, since not all VCs will feature navigation bars so a global setting makes no sense.

0

精彩评论

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

关注公众号