iosuiscrollviewuinavigationcontrollerhud

Scroll VIew and MBProgressHUD


I am new to iphone development. What i have done here is, loading a view with a scroll view on which I m showing pictures. I have got a basic navigation controller in the app.. Now, during the loading of picture if the picture is not fully loaded i want to add a MBProgressHUD.. I m using the following code for that but, not able to see the it infront of the scroll view although the hud is added on the view as i am unable to move the scroll View..

HUD = [[MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES] retain];
[[self.view superview] bringSubviewToFront:self.navigationController.view];

Any Suggestions please... Thanks for your help..


Solution

  • Assuming when you do:

    HUD = [[MBProgressHUD showHUDAddedTo:self.navigationController.view animated:YES] retain];
    

    You get an UIImageView, you can do something like:

    [scrolView.view addSubView HUD.view];
    HUD.frame=CGRectMake(x,y,width,height) //So you can specify where you want your image.