1

I'm trying to implement an NSPopUpButton but Xcode does not recognize it. After I type NSPopUpButton Xcode does not offer code completion and reports the problem "use of undeclared identifier". Is there a specific framework I have to add and if so which one. Sorry I know there is probably a simple fix...

Thanks

rivtracks
  • 43
  • 7

1 Answers1

3

That's because NSPopUpButton inherits from NSButton which is declared in the AppKit framework for OS X, and you can not use an OS X class in an iOS project.

(Basing this off the use of the iOS tag in the question)

If this is a Mac project, then you should check to make sure that your class is importing the AppKit framework, or Cocoa/Cocoa.h which also imports AppKit.

Mick MacCallum
  • 129,200
  • 40
  • 280
  • 281
  • great that answers my question. Is there anyway to implement a pop up button in cocoa touch? – rivtracks Feb 01 '14 at 22:37
  • 1
    @rivtracks Great to hear! Be sure to mark this answer as correct if it solved the problem. And not exactly, the closest you'll get will probably be UITableView, or UIPickerView. – Mick MacCallum Feb 01 '14 at 22:39