Reputation: 1816
Xcode is not showing all the buttons, textfields, etc. I have in my storyboard. As you can see in the image below, somehow all my elements are appearing with a "watermark" in the storyboard element inspector on the left. Why is it doing this? How can I fix it? It is driving me crazy because I cannot see where my elements are when I try and add some more...
How can I solve this and why is Xcode so buggy anyways?
Upvotes: 6
Views: 12331
Reputation: 30569
I think this is down to bad/old/unexpected properties on certain view controllers.
I had this problem today and couldn't see the solution posted anywhere so thought I would share it. Although on Xcode 15 the view controller shows grey background instead of white like the OP's screenshot.
In one detail view controller I noticed in the 5th tab the Bottom Bar was set to "Translucent Toolbar", I changed that to "Inferred" and then all the controllers in that one appeared.
In another project, all of the bars were already set to "Inferred" so I searched for any other bad settings and I noticed in the split view controller the Style was set to "Unspecified (Discouraged)" so I changed that to "Double Column" and then when selecting other view controllers all of the controls suddenly appeared!
As you can see in below image the Root View Controller table is not appearing:
Now with the column stlye changed it does appear:
(Note I had to click the root view controller again to get it to redraw after changing the setting)
Upvotes: 0
Reputation: 1168
I had a similar problem, some of my IBOutlets (labels) were showing on the Storyboard, I had no AutoLayout warnings/errors and everything seemed fine but yet some of the outlets were not showing on the Simulator. Things got even more complicated when I noticed that SOMETIMES the outlets DID show.. strange..
I ended up wrapping the call to show the view controller in a GCD method like this (swift code):
dispatch_async(dispatch_get_main_queue()) {
[unowned self] in
let vc = self.pages[0]
self.setViewControllers([vc], direction: .Forward, animated: false, completion: nil)
}
And that solved it..
Upvotes: 0
Reputation: 6847
You have a size class enabled (note the blue bar across the center-bottomish). My guess is that all those views are missing in that size class. Click the bar, turn it back to Any x Any.
Upvotes: 5