3

I switched from xCode 6 Beta 4 to xCode 6 Beta 5 and all the IBOutlet of my class are now nil despite my ViewController is successfully instantiated.

I've got a ViewController in my Storybord which inherits from ImagePickerViewController with an identifier.

In Swift code, I instantiate my ViewController this way:

let viewController = storyboard.instantiateViewControllerWithIdentifier(ImagePickerViewControllerIdentifier) as ImagePickerViewController

The viewController is found and instantiated but the IBOutlet inside are set to nil instead of being linked to the elements contained into my ViewController.

I found this answer to a similar problem:

Are view controllers with nib files broken in ios 8 beta 5?

When I tried the matt's solution, I've got a crash when I launched my app:

Unknown class _TtC7MyProject25ImagePickerViewController in Interface Builder file.

I think it's due to this tricks:

@objc(ImagePickerViewController) class ImagePickerViewController : UIViewController

Any suggestion to avoid the crash ?

Thanks !

Edit: After some tests, I found the bug. I don't need anymore to use the tricks pasted above. It came from the iOS Simulator. I deleted the app and installed once again and it works well.

Community
  • 1
  • 1
Jean Lebrument
  • 5,079
  • 8
  • 33
  • 67

0 Answers0