Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -(void)applicationWillTerminate{
- NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
- NSString *libraryDirectory = [paths objectAtIndex:0];
- NSMutableArray *file = [[NSMutableArray alloc] init];
- if ([uploadImages count] > 0) {
- for (id obj in uploadImages) {
- NSMutableDictionary *dict = [[NSMutableDictionary alloc] init];
- NSString *mystring = [[obj valueForProperty:ALAssetPropertyURLs]objectForKey:@"public.jpeg" ];
- [dict setObject:mystring forKey:@"img"] ;
- if ([dict objectForKey:@"img"] == nil) {
- [dict setObject:[[obj valueForProperty:ALAssetPropertyURLs]objectForKey:@"public.jpeg" ] forKey:@"img"] ;
- }
- [file addObject:dict];
- [dict release];
- }
- if ([file writeToFile:[libraryDirectory stringByAppendingPathComponent:@"uploadimages.plist"] atomically:YES])
- {
- NSLog(@"YES");
- }else
- {
- NSLog(@"files:%@",file);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement