My OS X app supports 10.9 - 10.11. I try to add some options to a printing operation by adding a print accessory view like this:
MyPrintView *printView = [[MyPrintView alloc] initWithData: [self myData]];
NSPrintOperation *printOperation = [NSPrintOperation printOperationWithView: printView];
NSPrintPanel *printPanel = [printOperation printPanel];
[printPanel addAccessoryController:[[MyPrintAccessory alloc] init]];
if (printOperation)
{
[printOperation runOperationModalForWindow:_window delegate:_window didRunSelector:nil contextInfo:nil];
}
The accessory view is defined by a controller
@interface MyPrintAccessory : NSViewController <NSPrintPanelAccessorizing>
and a view defined in a xib file.
All works perfectly as expected in El Capitan, but in Yosemite and Mavericks while the print panel let's me choose my accessory in the pop-up button, if I choose it, nothing is displayed, the space where the accessory view should be displayed remains empty. No error messages are generated neither at compile nor at runtime.
Does anybody have a hint on how to solve this, or a hint, how to search for the cause of this behaviour?
I had the same problem. I solved it by setting the option "Use Auto Layout" to off of my print accessory view nib file.