Search code examples
iosuitextfieldiboutlet

Cannot Link TextField to IBOutlet Variable


I have declared the IBOutlet variables that I want to hook up to my UI views like this in the header file:

@interface ViewController : UIViewController

@property (weak, nonatomic) IBOutlet UITextField *bookName;
@property (weak, nonatomic) IBOutlet UITextField *author;
@property (weak, nonatomic) IBOutlet UITextView *description;

@end

But when I ctrl-click from the View controller to the UI, I don't see the variables show up in the pop-up menu to be selected for linking. I see this:

enter image description here

But I expect to see the entire list of outlets


Solution

  • please check controllers class as shown in snapshot. it should point to current viewcontroller

    To open this panel select your controller from story board press cmd+option+0 viewcontorller