Reputation: 1625
I have an NSArrayController, the content of which I would like to be a list of the CGDirectDisplayID
s of all of the connected Screens. Right now I have the following code:
NSArray* screens = [NSScreen screens];
for (NSScreen* screen in screens)
{
NSNumber* screenId = (NSNumber*)[[screen deviceDescription] valueForKey:@"NSScreenNumber"];
[displaysList addObject:screenId];
}
[displaysArrayController setContent:displaysList];
displaysList is an NSMutable array which is allocated in awakeFromNib
, what do I need to do in interface builder to populate a popup button with the values in displaysList
?
Upvotes: 1
Views: 613
Reputation: 3389
I hope that helps :)
Upvotes: 1