I am using NSSavePanel to save image.
I have used IKSaveOption which gets added to the NSSavePanel. When save panel tries to open the sheet for window it crashes saying -
*** Assertion failure in -[IKSaveOptionsContainer _didChangeHostsAutolayoutEngineTo:], /SourceCache/AppKit/AppKit-1343.14/Layout.subproj/NSView_Layout.m:577 - Should translate autoresizing mask into constraints if _didChangeHostsAutolayoutEngineTo:YES.
I am following this code:
NSSavePanel *savePanel = [NSSavePanel savePanel];
[savePanel setDirectoryURL:[NSURL URLWithString:NSHomeDirectory()]];
[savePanel setDelegate:self];
[savePanel setPrompt:NSLocalizedString(@"save",nil)];
[savePanel setAllowedFileTypes:[NSArray arrayWithObjects:@"png",@"jpeg",nil]];
IKSaveOptions * opt = [[IKSaveOptions alloc] initWithImageProperties:nil
imageUTType:(NSString *)kUTTypePNG];
[opt addSaveOptionsAccessoryViewToSavePanel:savePanel];
[savePanel setExtensionHidden:NO];
[savePanel beginSheetModalForWindow:self.window completionHandler:^(NSInteger result){.....
}
This code works in Maverick, but not on Yosemite. Are there any layout changes in the new OS API?