0

I have started an Objective-C application, I created a custom NSView class and assigned it to the NSTableView's view.

But now I can't connect any IBOutlet to the header file of this class, how can I resolve that?

Thanks a lot for any help possible.

EDIT: Added screenshot of re-connection with pre-entered IBOutlet:

IBOutlets not connecting

Jeremiah Smith
  • 740
  • 6
  • 17
  • How do you mean you can't connect? – Woodstock Jan 08 '14 at 17:30
  • Thanks for your quick reply @John Woods I mean I cannot right-click and drag to header file to create a new outlet. It semi-works when using pre-entered outlets and connecting on top of them, but I get error symbols next the key paths, and don't know how to work around it. – Jeremiah Smith Jan 08 '14 at 17:35
  • Thanks. And what precisely do you mean by "created a custom NSView class and assigned it to the NSTableView's view"? – Rob Jan 08 '14 at 19:26
  • Really just what it says, created a new class based on NSView and then went over to interface builder, and assigned the view of the specific NSTableView to it in the inspector. – Jeremiah Smith Jan 08 '14 at 21:02

1 Answers1

0

I solved it by using AppDelegate class itself, as described in Apple's Documentation.

For custom views I think its best to use a separate controller, as described by juliuspaintings.

To instantiate a class in interface builder, simply follow these steps from dbachrach.

For the difference between controller and delegate I would recommend this answer: Delegate and controller

Community
  • 1
  • 1
Jeremiah Smith
  • 740
  • 6
  • 17