UIContainerView seems missing?

I am not able to create an outlet between my UIViewController and a UIContainerView in IB. In the the past I've used UIView for the IBOutlet definition and IB let me create the outlet. In iOS 9, Xcode 7 no can do in either Swift 2 or Objective-C. UIContainerView is not defined in either Swift 2 or Objective-C and IB will not make a connection using UIView for the definition.


Anyone have any ideas?

Answered by mburnet6 in 21113022

Workaround I found: Make an IB connection with UIContainerView from Storyboard. After the connection is made (and build errors come up), change the type from UIContainerView to UIView. Xcode wouldn't let me connect it to a UIView outlet, but after changing the type to UIView, the connection made remained and project built. This has to be a Xcode 7 bug since UIContainerView connections in Xcode 6 are UIView.

I'm getting the same thing. Hooking up a container view to an outlet causes a compiler error - "Use of undeclared type 'UIContainerView'" - Import UIKit is at the top of the Swift file.

Accepted Answer

Workaround I found: Make an IB connection with UIContainerView from Storyboard. After the connection is made (and build errors come up), change the type from UIContainerView to UIView. Xcode wouldn't let me connect it to a UIView outlet, but after changing the type to UIView, the connection made remained and project built. This has to be a Xcode 7 bug since UIContainerView connections in Xcode 6 are UIView.

My workaround was to open the project in Xcode 6.4 make the connection, then open in Xcode 7 and it worked fine.

UIContainerView seems missing?
 
 
Q