Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code>You need to create a method in AppDelegate.m class #pragma mark activity indicator view -(void)showActivityViewer:(NSString* )msg { if (activityView1 == nil) { [activityView1 release]; activityView1 = [[UIView alloc] initWithFrame: CGRectMake(0, 0, 320, 580)]; activityView1.backgroundColor = [UIColor darkGrayColor]; activityView1.alpha = 0.8; UILabel* lblLoading=[[UILabel alloc] initWithFrame:CGRectMake(70, 260, 180, 60)]; lblLoading.numberOfLines=0; lblLoading.text=msg; lblLoading.backgroundColor=[UIColor clearColor]; lblLoading.textAlignment=UITextAlignmentCenter; [lblLoading setContentMode:UIViewContentModeBottom]; lblLoading.textColor=[UIColor whiteColor]; [activityView1 addSubview:lblLoading]; [lblLoading release]; UIActivityIndicatorView *activityWheel = [[UIActivityIndicatorView alloc] initWithFrame: CGRectMake(self.window.bounds.size.width / 2 - 15, self.window.bounds.size.height / 2 - 30, 30, 30)]; activityWheel.activityIndicatorViewStyle = UIActivityIndicatorViewStyleWhite; activityWheel.autoresizingMask = (UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin | UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin); [activityView1 addSubview:activityWheel]; [activityWheel release]; } [self.window addSubview: activityView1]; [[[activityView1 subviews] objectAtIndex:0] setText:msg]; [[[activityView1 subviews] objectAtIndex:1] startAnimating]; } </code></pre> <p>Every time whenever you need to show activity indicator in the whole use this...It automatically manages all the things<BR></p> <p>To hide the indicator call this method,same in the AppDelegate.m class</p> <pre><code>-(void)hideActivityViewer { [[[activityView1 subviews] objectAtIndex:1] stopAnimating]; [activityView1 removeFromSuperview]; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload