I have used singleton class for activityIndicator.Then i will call that class where ever i want. No problem while loading but loading is not appearing while pushing to other viewcontroller.
- (void)editBtntapped
{
[loading showLoadingView:self.view ForSubView:self.view];
Screen_Participant_Edit *controller=[[Screen_Participant_Edit alloc]init];
[self.navigationController pushViewController:controller animated:NO];
[controller release];
}
loading is the object of sigleton class.
You’ll have to show ActivityIndicator on the MAINWINDOW instead the UIVIewController.
What you are doing is adding the ActivityIndicator to the previous UIViewController and then pushing new UIViewController. So, the present UIViewController in which ActivityIndicator was placed disappears.