Question: I want to implement a listview, on which swiping opens up the `actions` that we can do with that item. I have attached an image.

![enter image description here](https://i.stack.imgur.com/j0ayI.jpg)

Answer: 
If you have saved different image in documents directory but at the time of loading in tableview cell, it is showing one image, then just set image of your imageview to Nil before setting new image like below:

```
cell.imageView.image = Nil;

```
Also you can use like that,

```
-(NSString *)ImageString{

    NSData *imgdata = UIImageJPEGRepresentation(self.imgView.image, 0.5);
    NSString *imagename =[self generateImageName];

    NSFileManager *fileManager = [NSFileManager defaultManager];
    [fileManager createFileAtPath:[NSString stringWithFormat:@"%@/%@",   DOCUMENTS_FOLDER,imagename]
                         contents:imgdata
                       attributes:nil];
    return imagename;

    }
       -(NSString *)generateImageName{

        int timestamp = [[NSDate date] timeIntervalSince1970];
        NSString *StrImage = [NSString stringWithFormat:@"Image_%d.png",timestamp];
        NSLog(@"image name=%@",StrImage);
        return StrImage;
    }

```

And Define In Header like that,

```
#define DOCUMENTS_FOLDER [NSHomeDirectory() stringByAppendingPathComponent:@"Documents"]

```