IBoutlets nil in xCode 6 Beta 5 when instantiating ViewController from storyboard

I switched from xCode 6 Beta 4 to xCode 6 Beta 5 and all of IBOutlet

my classes are now null, even though my ViewController is successfully created.

I have a ViewController in mine Storybord

that inherits from ImagePickerViewController

ID.

In Swift code, I instantiate my ViewController like this:

let viewController = storyboard.instantiateViewControllerWithIdentifier(ImagePickerViewControllerIdentifier) as ImagePickerViewController

      

The viewController element was found and created, but internally IBOutlet

set to a value nil

instead of binding to the elements contained in my ViewController.

I found this answer for a similar problem:

Are view controllers with nib files in iOS 8 beta 5?

When I tried the matte solution, I got a crash when starting the application:

Unknown class _TtC7MyProject25ImagePickerViewController in interface File Builder.

I think it is because of these tricks:

@objc(ImagePickerViewController) class ImagePickerViewController : UIViewController

      

Any suggestion to avoid crashing?

Thank!

Edit: After some testing, I came across an error. I no longer need to use the tricks pasted above. It came from the iOS simulator. I uninstalled the app and installed it again and it works well.

+3


source to share





All Articles