runModalForTypes:
Displays the panel and begins a modal event loop that is terminated when the user clicks either OK or Cancel.
Declaration
- (NSInteger) runModalForTypes:(NSArray *) fileTypes;Parameters
- fileTypes:
An array of file extensions and/or HFS file types. Specifies the files the panel allows the user to select.
nilmakes all files selectable by the user. An array of types passed in here will override one set using Allowedfiletypes.
Return Value
The button used to dismiss the dialog: NSOKButton for the OK button and NSCancelButton for the Cancel button.
Discussion
This convenience method sends runModalForDirectory:nil file:nil types:``fileTypes to the panel. See runModalForDirectory:file:types: for additional details.