Search code examples
objective-cmacoscocoanstextfieldiboutlet

Where is NSTextField?


I'm brand new to Mac OS X development. Primarily a Java and C# developer. I'm reading this book and trying a few examples from the book.

In my AppController class, I'm trying to add an IBOutlet as follows :

IBOutlet NSTextField *textField;

It gives me an error saying "Unknown type name 'NSTextField'. I have imported Foundation/Foundation.h

Please help.


Solution

  • #import <Cocoa/Cocoa.h> 
    

    Import this in your AppController header file