3

Today I tried to use a container view in Xcode and when I searched in the bar at the bottom of the Library menu, I could not find it. I have also searched through the entire list and can not find it.

Does anyone have any idea what might be occurring. I am using Xcode 6.4.

enter image description here

Any suggestions will be much appreciated.

pls
  • 1,522
  • 2
  • 21
  • 41

6 Answers6

7

It looks like the reason I can't find it is because I am using XIB's and not a storyboard (which is what I used in the past when I used a container view).

Thanks to the other answers which helped me come to this conclusion.

pls
  • 1,522
  • 2
  • 21
  • 41
3

I am using Xcode V6.4 and searched by the name UIContainer/container in the object library section of utilities. and It is showing the container view.

pabitranjan
  • 775
  • 6
  • 12
2

You can find it in your storyboard. See image bellow. enter image description here

Long Pham
  • 7,464
  • 3
  • 29
  • 40
2

This is definitely a bug that is still present in Xcode 7.3.1. However, I kept playing with switching tabs and looking into other storyboards to see if I could make it find it from a different file. It turns out that after a navigating thru some of my storyboards and seeing the storyboard form the main editor (instead of doing it from the assistant editor) I was able to find it.

Hope this helps!

kriztho
  • 300
  • 2
  • 14
0

Oddly, there seems to be a bug in Xcode 6.4. Once I changed the tab in the lower right navigator and came back to the Objects tab, the search/filter worked again. I had the same exact problem in the same exact version of Xcode.

Eric G
  • 1,429
  • 18
  • 26
  • Hi Eric. Are you using storyboards or xib files. I can only see container view when using storyboards. – pls Aug 25 '15 at 08:54
  • @pls - I use both. But in this case, I was specifically using Main.storyboard. I embed a table view controller inside of a non-table view controller which has a static bottom view. The issue hasn't happened since, oddly. Maybe it has something to do with Xcode internally caching its filter results for the Object navigator? – Eric G Aug 25 '15 at 21:23
  • Thanks for that. I have not had any problems with storyboards. However it seems like it's not available using xib's. – pls Aug 26 '15 at 21:15
0

Like kriztho said, container view won't be listed in the object library when viewing storyboard from the assistant editor for some stupid reason. I'm using Xcode 9, and this is still an issue. Right when I switched storyboard to the standard editor (Cmd + return on Mac), the container view was listed once again in the object library.

Paul K.
  • 51
  • 1
  • 5