Storyboard View Elements Greyed Out

Storyboard View Elements Greyed Out

The problem is probably related to Size Classes. If you have the option enabled make sure that the views were created for the size class that you have currently selected in IB (the grid thing).

Why don't my views show up in Storyboards and are greyed out in the left pane?

Just found an answer myself, it was because Size Classes were reset after I moved the project...

Greying out views is Xcode's standard behaviour when the views are only set for a specific size class which is currently not selected!

I had set the size classes for my UIViewController to Compact - Any, this is what it looks like in proper state:

Sample Image

The problem occurs when I change the size classes to another one (e.g. Any - Any):

Sample Image

Why is the storyboard blank and the views are greyed out?

It seems like you're using size classes without knowing about it.

If so, you should first try to understand what size classes are and how to use them. Here are some good starting points:

  • Apple's Human Interface Guidelines on Adaptivity and Layout
  • Apple Docs on Installing and Uninstalling Views for a Size Class
  • Ray Wenderlich's Adaptive Layout Tutorial

To resolve you current issue...

... and make all views appear again, first select the (Any | Any) size class in Interface Builder ('C' in your screenshot) and then do the following for each of your greyed-out views:

  1. Select the view.
  2. In the section to which your letter 'B' is pointing delete all rows that have some text in front of the checkbox (like "wAny hR") by clicking the ✕ in front of the row.
  3. Check the checkbox of the remaining line on top (in the same section).

This will install your views for all size classes. You'll see them both in Interface Builder and at runtime in Simulator or on your device.

Unless you've understood what size classes are all about and how to make use of them always make sure that the (Any | Any) size class is selected in Interface Builder before making any changes to your layout. (Because when you select a different size class and add views or constraints, those will only be added (= installed) to that particular size class and not to the others.)

How can I make a cell and its elements look greyed out?

You could do:

readOverlayView.autoresizingMask = [.flexibleWidth, .flexibleHeight] before adding it as a subview, to make it expand on all the cell.

I would suggest, however, to make this overlay view in the Storyboard file inside the cell, expose it here as IBOutlet ant simply set isHidden value in updateCellProperties method.

Good luck!

Contraints greyed-out in Xcode

XCode 6 now supports different layouts. This greyed out constraints exist in Compact Width | Any Height layout, for example, but you currently editing Any Width | Any Height.

More detailed:
Storyboard View Elements Greyed Out

UI elements not visible on Storyboard editor, but visible on some device sizes

It's because the views have been set for a different size class in Interface Builder than the one which you have currently selected.

Just modify your current size class to the one for which the views have been defined.

I encountered the same issue, read more here: Why don't my views show up in Storyboards and are greyed out in the left pane? and Interface Builder Objects not visible in my storyboard (and titles are transparent)

Note that whenever you have a particular size class selected, all UI elements will only be available/visible within that particular size class.

App Widgets are greyed out on home screen only

Allowed memory to a widget is limited and I reduced the size of image files that I was using and it is working fine now.

Everything got deleted on my Xcode storyboard... Went completely blank

The problem is u used the Size Classes in your project.

As soon as you switch from One Size class to other Size class Some of constraint and UIElement are disable as the given Screen size is not able to fit that UI Component.

If u want to use the Size classes just flow this great tutorial Building Adaptive User Interfaces for iOS 8

If you don't wish to use Size Classes just disable it .

It will work.

To disable SizeClass select ViewController go to File Inspector and uncheck Use Size Classes

Sample Image



Related Topics



Leave a reply



Submit