One Quickie


Loading an image from a website (NSURL->General)
(this will block until it loads)
    NSURL *url;
    NSData *data;
    NSImage *blork;
    url = [NSURL URLWithString: @"http://borkware.com/hacks/random-pic"];
    data = [url resourceDataUsingCache: NO];
    blork = [[NSImage alloc] initWithData: data];



borkware home | products | miniblog | rants | quickies | cocoaheads
Advanced Mac OS X Programming book

webmonster@borkware.com