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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:31:19+00:00 2026-05-31T15:31:19+00:00

Currently i am developing a sample where i am displaying 4 webview in ipad

  • 0

Currently i am developing a sample where i am displaying 4 webview in ipad screen and trying to show 4 different URL in them.

All the web pages are showing in the webview perfectly.

Also i am displaying 4 activity indicator once the webpage starts loading.

But i can not figure out how to stop activity indicator in all the respective webpage one by one once they are loaded in to the screen.

-(void)createWebView
{

    //******************** First *********

    firstWebView=[[UIWebView alloc]init];
    firstWebView.frame=CGRectMake(10, 50, 350, 470);
    firstWebView.delegate=self;
    firstIndicator = [[UIActivityIndicatorView alloc] 
                                        initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
    firstIndicator.center = CGPointMake(160, 240);
    firstIndicator.hidesWhenStopped = YES;
    [self.firstWebView addSubview:firstIndicator];
    [firstIndicator startAnimating];
    firstWebView.backgroundColor=[UIColor grayColor];
     NSURL *firstUrl = [NSURL URLWithString:@"http://www.techtree.com"];
     NSURLRequest *firstRequestObj = [NSURLRequest requestWithURL:firstUrl];
    [firstWebView loadRequest:firstRequestObj];
    [self.view addSubview:firstWebView]; 

    //******************* Second *********

    secondWebView=[[UIWebView alloc]init];
    secondWebView.frame=CGRectMake(405, 50, 350, 470);
    secondWebView.delegate=self;

    secondIndicator = [[UIActivityIndicatorView alloc] 
                      initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
    secondIndicator.center = CGPointMake(160, 240);
    secondIndicator.hidesWhenStopped = YES;
    [self.secondWebView addSubview:secondIndicator];
    [secondIndicator startAnimating];
    secondWebView.backgroundColor=[UIColor grayColor];

    NSURL *secondUrl = [NSURL URLWithString:@"http://www.facebook.com"];
    NSURLRequest *secondRequestObj = [NSURLRequest requestWithURL:secondUrl];
    [secondWebView loadRequest:secondRequestObj];
    [self.view addSubview:secondWebView]; 


    //****************** Third ************

    thirdWebView=[[UIWebView alloc] init];
    thirdWebView.frame=CGRectMake(10, 528, 350, 470);
    thirdWebView.delegate=self;


    thirdIndicator = [[UIActivityIndicatorView alloc] 
                       initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
    thirdIndicator.center = CGPointMake(160, 240);
    thirdIndicator.hidesWhenStopped = YES;
    [self.thirdWebView addSubview:thirdIndicator];
    [thirdIndicator startAnimating];

    thirdWebView.backgroundColor=[UIColor grayColor];

    NSURL *thirdUrl = [NSURL URLWithString:@"http://www.yahoo.com"];
    NSURLRequest *thirdRequestObj = [NSURLRequest requestWithURL:thirdUrl];
    [thirdWebView loadRequest:thirdRequestObj];
    [self.view addSubview:thirdWebView];

    //***************** Fourth ************
    fourthWebView=[[UIWebView alloc] init];
    fourthWebView.frame=CGRectMake(405,528, 350, 470);
    fourthWebView.delegate=self;


    fourthIndicator = [[UIActivityIndicatorView alloc] 
                      initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
    fourthIndicator.center = CGPointMake(160, 240);
    fourthIndicator.hidesWhenStopped = YES;
    [self.fourthWebView addSubview:fourthIndicator];
    [fourthIndicator startAnimating];

    fourthWebView.backgroundColor=[UIColor grayColor];

    NSURL *fourthUrl = [NSURL URLWithString:@"http://stackoverflow.com"];
    NSURLRequest *fourthRequestObj = [NSURLRequest requestWithURL:fourthUrl];
    [fourthWebView loadRequest:fourthRequestObj];
    [self.view addSubview:fourthWebView];


    //******************** Memory Managemt **********
    [firstWebView release];
    [secondWebView release];
    [thirdWebView release];
    [fourthWebView release];

    [firstIndicator release];
    [secondIndicator release];
    [thirdIndicator release];
    [fourthIndicator release];


}
  • 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-31T15:31:20+00:00Added an answer on May 31, 2026 at 3:31 pm
    overwrite below delegate method and check which webview is loading finished like below
    
    - (void)webViewDidFinishLoad:(UIWebView *)webView
    {
       if(webView== firstWebView)
       { 
         [firstIndicator setHidden:YES];
       }
      else
      {
         so on...
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am new to Eclipse. Currently developing a sample web application using primefaces 3.1
I am currently developing my program using sample BluetoothChat program on android device. This
I am currently developing a C# Windows Form Application. Now I am trying to
I'm currently developing a simple text editing app for iPad using UITextView. I want
I'm currently developing a consrol software for a camera that delivers 14 bit/sample grayscale
I'm currently developing an IPhone app that uses edge detection. I took some sample
I am currently developing iPad application which involve retrieving information from webservice and then
I am currently developing a very simple web service and thought I could write
I'm currently developing a simple iPhone application using a UITabBar and table views for
I am currently developing a very simple script in AutoHotKey, but it involves using

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.