I have created files AViewController.h and AViewController.m, for a view controller - I have set the custom class of this view controller to AViewController
.
I have an object defined in AViewController.h, which is an instance of another class B as:
@property (weak, nonatomic) IBOutlet B *object_b;
I want to be able to link this IBOutlet to the view controller, so that I can use it to call functions of class B to display things on the view controller. However, I'm not able to do this - trying to drag a line from the object to the view controller does nothing. There are no errors or yellow warning symbols next to the object. I tried doing this from the view controller to the object as well, and also tried this from the menu in the storyboard.
Should my view controller be renamed to 'AViewController'? I have other view controllers which had names different from their custom classes and they didn't have any linking problems.
I tried solutions from: XCode 6: can't connect any IBOutlet to ViewController and Error in Xcode 6 - view controller does not have an outlet named (subview), but they didn't work.
I'm using XCode 6.2
It's a really annoying problem; there was some discussion in the previous questions about a bug report, but I'm not sure if it was solved. Appreciate any help!