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

  • Home
  • SEARCH
  • 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 6658975
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T01:58:36+00:00 2026-05-26T01:58:36+00:00

I hide webview in webViewDidStartLoad: Make request Make stringByEvaluatingJavaScriptFromString in webViewDidFinishLoad: Show webview But

  • 0
  1. I hide webview in webViewDidStartLoad:
  2. Make request
  3. Make stringByEvaluatingJavaScriptFromString in webViewDidFinishLoad:
  4. Show webview

But when I run app, I can see how JS working. Where is my fault?

Also, I write NSLog(@”%@”, self.webView) before and after self.webView.hidden = FALSE;

<UIWebView: 0x5e37720; frame = (0 44; 768 955); hidden = YES; autoresize = W+H; layer = <CALayer: 0x5e37780>>
<UIWebView: 0x5e37720; frame = (0 44; 768 955); autoresize = W+H; layer = <CALayer: 0x5e37780>>

FirstViewController.m :

- (void)webViewDidStartLoad:(UIWebView *)webView{
self.webView.hidden = TRUE;
}

- (void)webViewDidFinishLoad: (UIWebView *) webView {
    [self useJScript:self.webView];
NSLog(@"Show %@", self.webView);//result above^^^
self.webView.hidden = FALSE;
NSLog(@"Showned %@", self.webView);
}

- (void)useJScript:(UIWebView *) webView{
NSLog(@"Применяю jscript для %@",webView);
NSString *path = [[NSBundle mainBundle] pathForResource:@"jsmain" ofType:@"html"];
NSFileHandle *readHandle = [NSFileHandle fileHandleForReadingAtPath:path];
NSString *htmlString = [[NSString alloc] initWithData: 
                        [readHandle readDataToEndOfFile] encoding:NSUTF8StringEncoding];
[webView stringByEvaluatingJavaScriptFromString:htmlString];
}
  • 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-26T01:58:37+00:00Added an answer on May 26, 2026 at 1:58 am

    It’s not straightforward but it works:

    We can show webView after webViewDidFinishLoad method and take 0.2 sec(it doesn’t matter for user) to finish JScript in it.

    Just add [self performSelector:@selector(hidden_false) withObject:nil afterDelay:0.2 ]; to webViewDidFinishLoad method. And

    -(void) hidden_false{
    self.webView.hidden = FALSE;
    [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to hide a Windows form from the taskbar but I can't use
I can show/hide with IDs, however how do I do it with classes? $('black').setStyle({
I want to dynamically hide/show some of the columns in a NSTableView, based on
I'd like to display a toolbar above a UIWebView but hide the toolbar until
I have a tab bar app but the first tab is an image with
Hide/Close Loginform.aspx if userid/password is correct then show newform.aspx and how to create message
How to hide or show line from PHP designer. example: this is show lines
How can I hide a particular row in a GridView? For Example If I
How can I hide a specific <div> from Google? Is there any other solution
I want to hide a link on a HTML page, and only show it

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.