|
@@ -279,7 +279,7 @@
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- (NSString *)saveImage:(UIImage *)img {
|
|
- (NSString *)saveImage:(UIImage *)img {
|
|
|
- NSString *dir = [NSString stringWithFormat:@"%@/%@",[RAUtils appCacheDirectory],self.name];
|
|
|
|
|
|
|
+ NSString *dir = [NSString stringWithFormat:@"%@/%@",NSTemporaryDirectory(),self.name];
|
|
|
|
|
|
|
|
NSDate * date = [NSDate date];
|
|
NSDate * date = [NSDate date];
|
|
|
NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init];
|
|
NSDateFormatter * dateFormatter = [[NSDateFormatter alloc] init];
|
|
@@ -357,6 +357,16 @@
|
|
|
[self showCamera];
|
|
[self showCamera];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+- (void)moveTmpImageToCache:(NSString *)img {
|
|
|
|
|
+
|
|
|
|
|
+ NSString *dir = [NSString stringWithFormat:@"%@/%@",NSTemporaryDirectory(),self.name];
|
|
|
|
|
+ NSString *tmpPath = [dir stringByAppendingPathComponent:img];
|
|
|
|
|
+ NSString *cachePath = [NSString stringWithFormat:@"%@/%@/%@",[RAUtils appCacheDirectory],self.name,img];
|
|
|
|
|
+
|
|
|
|
|
+ NSFileManager *fileManager = [NSFileManager defaultManager];
|
|
|
|
|
+ [fileManager moveItemAtPath:tmpPath toPath:cachePath error:nil];
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
#pragma mark - Image Picker Button Action
|
|
#pragma mark - Image Picker Button Action
|
|
|
|
|
|
|
|
- (void)cancelCameraClick:(UIButton *)sender {
|
|
- (void)cancelCameraClick:(UIButton *)sender {
|