After using webcam recording, you need to delete the system cache data!

Source: Internet
Author: User

When I use Uiimagepickercontroller, the video

When you are finished, use

-(void) Imagepickercontroller: (Uiimagepickercontroller *) Picker Didfinishpickingmediawithinfo: (NSDictionary *) info

Save the required data, the data links or data are placed in the dictionary info, that is, info keeps the system for you to save the original video path.

What about the raw data after I've saved my own stuff and exited? Do you want to delete it automatically? The answer is NO!

So, if you don't need it, you'll have to delete it yourself.

-(void) Imagepickercontroller: (uiimagepickercontroller *) Picker didfinishpickingmediawithinfo: ( nsdictionary *) info{    if (picker.mediatypes[0]== (nsstring *) kUTTypeMovie) {         NSError *err;         NSURL *videoURL=[info objectForKey:UIImagePickerControllerMediaURL];         NSData *videoData=[NSData dataWithContentsOfURL:videoURL];         //Save the video to your desired folder, this is my own method         [self  savevideotocache:videodata];        //Delete raw Data          NSFileManager *fm=[NSFileManager defaultManager];         [fm removeitematurl:videourl error:&err];    }     [self&nbSp;dismissviewcontrolleranimated:yes completion:null];} 

PS: Photo Doesn't matter, because it's only in memory and won't be stored permanently!

After using webcam recording, you need to delete the system cache data!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.