Skip to content

inket/MBDropZone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Info

This is a small NSView subclass that accepts file drag & drop and is easy to setup. It is currently being used in MacSymbolicator. It can probably be done much easier and with cleaner code (I am not proud), it was an experiment and I've learned so much since then.

Hope it's useful to you.

Usage

- (void)setupDropzone {
	MBDropZone* dropzone = [][MBDropZone alloc] initWithFrame:CGRectMake(0, 0, 200, 200)];
    dropzone.text = @"Drop Crash Report"; 
    dropzone.fileType = @".crash"; // Sets the icon and file type it accepts
    dropzone.delegate = self;
}

- (void)dropZone:(MBDropZone*)dropZone receivedFile:(NSString*)file {
	NSLog(@"User dropped '%@'", file);
}

About

Easy file drag & drop for OS X

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published