Leahcim
Leahcim

Reputation: 41919

Is NSArrayController deprecated, what is its replacement?

I found an Xcode project that uses something called an NSArrayController like this

#import <Cocoa/Cocoa.h>

@interface MyDocument : NSPersistentDocument {

    IBOutlet NSArrayController *itemsArrayController;
    NSArray *_sortDescriptors;
    IBOutlet NSTableView *itemsTableView;

}

I was trying to use the project, which implements drag and drop, as a guide for an app I'm currently building. There's nothing in Xcode documentation when I option click on NSArrayController and I tried to create an NSArrayController property but received a warning that it doesn't exist. Was it deprecated? What has its functionality been replaced by?

Upvotes: 0

Views: 169

Answers (1)

Tomas Camin
Tomas Camin

Reputation: 10086

NSArrayController is part of the AppKit.framework which is only available on the MacOS platform.

Upvotes: 5

Related Questions