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 8766767
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T16:38:01+00:00 2026-06-13T16:38:01+00:00

I have created a app that record video and store it on server now

  • 0

I have created a app that record video and store it on server now i want to add HUD in my application ,this HUD will show until my data will store on server.

I am using MKNetworkKit fot posting data to the server.

I have tried this:

- (void) imagePickerController: (UIImagePickerController *) picker
 didFinishPickingMediaWithInfo: (NSDictionary *) info {

    NSString *mediaType = [info objectForKey: UIImagePickerControllerMediaType];

    //NSLog(@"medea type is: %@ ",mediaType);

    if ([mediaType isEqualToString:@"public.movie"]){
      //  NSLog(@"got a movie");
        NSURL *videoURL = [info objectForKey:UIImagePickerControllerMediaURL];
        webData = [NSData dataWithContentsOfURL:videoURL];

    }

    [self dismissModalViewControllerAnimated:NO];

    // Handle a movie capture
    if (CFStringCompare ((__bridge_retained CFStringRef) mediaType, kUTTypeMovie, 0)
        == kCFCompareEqualTo) {

        NSString *moviePath = [[info objectForKey:
                                UIImagePickerControllerMediaURL] path];
        if (UIVideoAtPathIsCompatibleWithSavedPhotosAlbum (moviePath)) {
            UISaveVideoAtPathToSavedPhotosAlbum (moviePath,self, @selector(video:didFinishSavingWithError:contextInfo:), nil);
        } 
    }

    self.flUploadEngine = [[fileUploadEngine alloc] initWithHostName:@"reneveledat.net" customHeaderFields:nil];

    NSMutableDictionary *postParams = [NSMutableDictionary dictionaryWithObjectsAndKeys:
                                       @"testApp", @"appID",
                                       nil];      
    self.flOperation = [self.flUploadEngine postDataToServer:postParams path:@"/dilipvideotest/savefile.php"];
    [self.flOperation addData:webData forKey:@"uploadfile" mimeType:@"video/mov" fileName:@"upload.mov"];

    [self.flOperation onCompletion:^(MKNetworkOperation *operation) {

        NSLog(@"response string is : %@", [operation responseString]);

        response = [operation responseString] ;
[HUD removeFromSuperview];
        /*   
         This is where you handle a successful 200 response
         */
    }     
                           onError:^(NSError *error) {
                               NSLog(@"error : %@", error);
                               UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error"
                                                                               message:[error localizedDescription]
                                                                              delegate:nil
                                                                     cancelButtonTitle:@"Dismiss"
                                                                     otherButtonTitles:nil];
                               [alert show];        
                           }];



    [self.flUploadEngine enqueueOperation:self.flOperation ];

    // for HUD

    HUD = [[MBProgressHUD alloc] initWithView:self.view];
    HUD.labelText = @"Doing funky stuff...";
    HUD.detailsLabelText = @"Just relax";
    HUD.mode = MBProgressHUDModeAnnularDeterminate;
    [self.view addSubview:HUD];

    [HUD showWhileExecuting:@selector(doSomeFunkyStuff) onTarget:self withObject:nil animated:YES];


   }

- (void)doSomeFunkyStuff {
    float progress = 0.0;

    while (progress < 1.0) {
        progress += 0.01;
        HUD.progress = progress;
        usleep(50000);
    }
}

EDIT

its done now

i have just added this code

[HUD removeFromSuperview];

At

[self.flOperation onCompletion:^(MKNetworkOperation *operation) {

            NSLog(@"response string is : %@", [operation responseString]);

            response = [operation responseString] ;
    [HUD removeFromSuperview];
            /*   
             This is where you handle a successful 200 response
             */
        }  
  • 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-06-13T16:38:02+00:00Added an answer on June 13, 2026 at 4:38 pm

    You are adding the MBProgressHUD in the view.

    You need to remove it after the data is uploaded to server.

    So you need to write the removing code inside the completion block and error block.

    like:

    [self.flOperation onCompletion:^(MKNetworkOperation *operation)
    {
        [MBProgressHUD hideHUDForView:self.view animated:YES];
        NSLog(@"response string is : %@", [operation responseString]);
        response = [operation responseString] ;
    }     
    onError:^(NSError *error)
    {
       [MBProgressHUD hideHUDForView:self.view animated:YES];
        UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Error" message:[error localizedDescription] delegate:nil cancelButtonTitle:@"Dismiss" otherButtonTitles:nil];
        [alert show];        
    }];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created a app that record only video and send it on the
I have created a flexible navigation bar in my app that will show custom
So here is the situation - I have a store app that I want
I have an app that allows a user to record a video with UIImagePickerController
I have created an app that uses NSTimer, which gets triggered each second. My
I have successfully created an app that reads from a bundled .plist file and
I have created a nice icon for my app that quite accurately reproduces the
I have created an app in C# .Net 2.0 that uses the AxShockwaveFlash object
I've created an app that shows 8 buttons in coverflow using icarousel.i have to
I have created a service class for my network connection so that my app

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.