Search Results

Search found 2 results on 1 pages for 'ebabchick'.

Page 1/1 | 1 

  • Tree data structure in iphone with coredata

    - by ebabchick
    Hi, I am looking to store a tree structure in CoreData for iphone. Can someone give me some tips on the best way to go about this? Basically I want to have a bunch of folders that people can dive into in a table view, and I want to have leaves of the tree be photos. The thing is, I want to be able to let the user edit these folders on-the-fly and add folders and content (photos) at their discretion. I'm relatively new to CoreData. Any help would be appreciated. Thanks.

    Read the article

  • Writing photos (and other things) to disk and getting them later in iphone

    - by ebabchick
    I'm trying to write an image to disk: NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsPath = [paths objectAtIndex:0]; NSString* savePath = [documentsPath stringByAppendingPathComponent:@"photo"]; BOOL result = [data writeToFile:savePath atomically:YES]; if(result) NSLog(@"Save of photo success!"); Then, later, I try to retrieve for a table view cell image: NSData* getPhoto = [NSData dataWithContentsOfFile:[leaf content]]; UIImage* myImage = [UIImage imageWithData:getPhoto]; cell.imageView.image = myImage; Yes, I checked to make sure the [leaf content] returns the same NSString as savePath. What else could be the problem? [NSData dataWithContentsOfFile:[leaf content]]; returns nil.... Thanks guys

    Read the article

1