-1

enter image description here

How do I programmatically default select the file format in NSSavePanel?

I have it currently set to image types only, however it always defaults to TIFF.

NSSavePanel *savePanel = [NSSavePanel savePanel];
_saveOptions = [[IKSaveOptions alloc] initWithImageProperties: _imageProperties
                                                  imageUTType: _imageUTType];

[_saveOptions addSaveOptionsAccessoryViewToSavePanel: savePanel];
Dean Liu
  • 501
  • 5
  • 12

1 Answers1

0

Ken's comment lead me in correct direction. Passing in imageUTType will default the NSSavePanel selection.

_saveOptions = [[IKSaveOptions alloc] initWithImageProperties: _imageProperties
                                                  imageUTType:(NSString*)kUTTypeJPEG];
Dean Liu
  • 501
  • 5
  • 12