One Quickie


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



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

webmonster@borkware.com