I what to store images with below code but occur error,How should i store images(not in photo library in program like this method)?
NSMutableArray *array=[[NSMutableArray alloc]init];
[array addObject:[UIImage imageNamed:@"a"]];
[array addObject:[UIImage imageNamed:@"b"]];
NSArray *path = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES);
NSString *documentsDirectory = [path objectAtIndex:0];
NSString *fullPath = [documentsDirectory stringByAppendingPathComponent:@"SaveCartoons"];
NSMutableDictionary *dict = [[NSMutableDictionary alloc]init];
[dict setObject:array forKey:@"1"];
[NSKeyedArchiver archiveRootObject:dict toFile:fullPath];