NSOpenPanel Odd Floating Header
I'm seeing odd NSOpenPanel display in a project. The header column (sort) is floating rather than staying attached to the top of the view. Here is the code I'm using to present the panel:
NSOpenPanel *panel = [NSOpenPanel openPanel]; NSArray *fileTypes = @[(NSString *)kUTTypeJPEG, (NSString *)kUTTypePNG, (NSString *)kUTTypeBMP, (NSString *)kUTTypeTIFF]; [panel setCanChooseDirectories:NO]; [panel setAllowsMultipleSelection:NO]; [panel setAllowedFileTypes:fileTypes]; NSInteger i = [panel runModal];
If I use that same code in a brand new project, it presents correctly. Since I'm presenting a system panel, I don't see how my app could be responsible for this odd display, but I'm open. Does anyone have any suggestions as to what I might look for in my app that might be causing this behavior?
The app in question is targeting 10.10.
i'm pretty sure that the answer you're looking for here is that ultimately you want to use the block based completion handler calling api instead of runModal. apple intentionally or not left the legacy runModal api broken in various ways when it comes to NSOpen/SavePanel and sandboxed applications.