Developer Documentations doesn\'t provides fully describe of registerForDraggedTypes method. For example, i want that my app allow access only \"*.abc\" files. How can i do this
If you'd like to have files dragged onto your view, your should register for the NSFilenamesPboardType type. If you want accept only certain filenames, you can do that in your implementation of performDragOperation:. Something like:
- (BOOL)performDragOperation:(id < NSDraggingInfo >)sender {
NSArray *draggedFilenames = [[sender draggingPasteboard] propertyListForType:NSFilenamesPboardType];
if ([[[draggedFilenames objectAtIndex:0] pathExtension] isEqual:@"abc"])
return YES;
else
return NO;
}