Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6859831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:19:57+00:00 2026-05-27T02:19:57+00:00

I am succeeding in understanding how to make a camera app in my learning

  • 0

I am succeeding in understanding how to make a camera app in my learning journey:-)

The only thing I am stuck with is saving a video that I have recorded. I am able to save a photo, but the same does not work for videos.

So I think I have almost got it with the help of iBrad Apps.

got this code:

-(void)imagePickerController:(UIImagePickerController *)picker
   didFinishPickingMediaWithInfo:(NSDictionary *)info
 {
NSString *mediaType = [info objectForKey:UIImagePickerControllerMediaType];

[self dismissModalViewControllerAnimated:YES];

if ([mediaType isEqualToString:(NSString *)kUTTypeImage]) {
    UIImage *image = [info 
                      objectForKey:UIImagePickerControllerOriginalImage];

    imageView.image = image;

    if (newMedia)
        UIImageWriteToSavedPhotosAlbum(image, 
                                       self,
                                       @selector(image:finishedSavingWithError:contextInfo:),
                                       nil);
}
else{

    if ([mediaType isEqualToString:(NSString *)kUTTypeMovie]) {
        UIImage *movie = [info 
                          objectForKey:UIImagePickerControllerQualityTypeHigh];

        videoRecorder2.image = movie;

            if (newMedia)
                UISaveVideoAtPathToSavedPhotosAlbum(movie, 
                                               self,
                                               @selector(movie:finishedSavingWithError:contextInfo:),
                                               nil);
}}}

I have an if statement because the app can take both video and still images.

The first part is for still – which works and then the second part I am still tutu-ing with:-)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T02:19:58+00:00Added an answer on May 27, 2026 at 2:19 am

    Try this:

    UISaveVideoAtPathToSavedPhotosAlbum(moviepath,nil,nil,nil);
    

    Edit: Try this and modify your code to this method:

    // For responding to the user tapping Cancel.
    - (void) imagePickerControllerDidCancel: (UIImagePickerController *) picker {
    
        [[picker parentViewController] dismissModalViewControllerAnimated: YES];
        [picker release];
    }
    
    // For responding to the user accepting a newly-captured picture or movie
    - (void) imagePickerController: (UIImagePickerController *) picker
                didFinishPickingMediaWithInfo: (NSDictionary *) info {
    
        NSString *mediaType = [info objectForKey: UIImagePickerControllerMediaType];
        UIImage *originalImage, *editedImage, *imageToSave;
    
        // Handle a still image capture
        if (CFStringCompare ((CFStringRef) mediaType, kUTTypeImage, 0)
                == kCFCompareEqualTo) {
    
            editedImage = (UIImage *) [info objectForKey:
                        UIImagePickerControllerEditedImage];
            originalImage = (UIImage *) [info objectForKey:
                        UIImagePickerControllerOriginalImage];
    
            if (editedImage) {
                imageToSave = editedImage;
            } else {
                imageToSave = originalImage;
            }
    
        // Save the new image (original or edited) to the Camera Roll
            UIImageWriteToSavedPhotosAlbum (imageToSave, nil, nil , nil);
        }
    
        // Handle a movie capture
        if (CFStringCompare ((CFStringRef) mediaType, kUTTypeMovie, 0)
                == kCFCompareEqualTo) {
    
            NSString *moviePath = [[info objectForKey:
                        UIImagePickerControllerMediaURL] path];
    
            if (UIVideoAtPathIsCompatibleWithSavedPhotosAlbum (moviePath)) {
                UISaveVideoAtPathToSavedPhotosAlbum (
                        moviePath, nil, nil, nil);
            }
        }
    
        [[picker parentViewController] dismissModalViewControllerAnimated: YES];
        [picker release];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code . The problem is that I am not succeeding
I have two succeeding function with the same condition and I wonder what is
My app consists of a TabBar and several TableViews. I want to have the
I have the following ListPreference in a PreferenceActivity that I wish to populate with
I have a long-running script that seems to occasionally report the following NOTICE-level error:
I have a custom build of gcc/gdb that I'm trying to integrate with an
I have a main JavaScript file, we'll call core.js that other file are dependent
I am using Jquery UI tabs, and have it set to toggle the opacity
I need to know the cost of succeeding with a Preimage attack (In cryptography,
I have a php script which constructs an array of objects based on HTML

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.