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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:20:28+00:00 2026-05-30T23:20:28+00:00

I have create an IOS app. The app has MainViewController that will present/dismiss Modal

  • 0

I have create an IOS app.

The app has MainViewController that will present/dismiss Modal view from webViewController
nib file(contains NavBar and UIWebView). I want to inject my javascript functions in every web pages that loaded by the UIWebView and those functions will be call in webpages that means all functions had to finish load before pages finish load.

I try many ways but it seem like when the ModalView present again(it’s work fine at first present).The page doesn’t know my injected function.

So my question is:

  • Where should i inject my javascript if the UIWebView load request when the ModalView present? Before loadRequest? didStartLoad? didFinishLoad?
  • What should i do with UIWebView when dismiss the ModalView? load the about:blank request?

Thanks for reading and any help/suggestion. 🙂

  • 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-30T23:20:29+00:00Added an answer on May 30, 2026 at 11:20 pm

    Where should i inject my javascript if the UIWebView load request when the ModalView present? Before loadRequest? didStartLoad? didFinishLoad?

    In webViewDidFinishLoad:. You cannot call stringByEvaluatingJavaScriptFromString: until this point. There is unfortunately no good way to get to this point without displaying the web view, which can lead sometimes to the view “flashing” if your JavaScript changes things too much. I sometimes wind up putting an extra view over the web view to hide it until after webViewDidFinishLoad: completes.

    What should i do with UIWebView when dismiss the ModalView? load the about:blank request?

    Nothing. It should be released when the modal view is released.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a universal iOS app with a custom view that has three buttons,
I have been working on a Core Data iOS app that works perfectly through
We have an iOS app which has been approved for release with its version
Recently I've been wondering about the fact that that an iOS app only has
We have an iOS app whose push notification cert has expired and we're trying
I have written an iOS app that calls NSUrlConnection multiple times to download image
We're creating an iOS photo app. In doing this, we have to create dynamically
I am trying to create a web app that will size itself to fill
So my intention is to have a login in my iOS app that allows
Oh woe is me - iOS 5 has broken my app. I have a

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.