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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T23:52:24+00:00 2026-06-10T23:52:24+00:00

I am working in iPhone application, Using Webview to load Addvertisement in bottom of

  • 0

I am working in iPhone application, Using Webview to load Addvertisement in bottom of the screen and its working fine, i want to when the user select the WebView, its automatically goes to browser and load in iPhone device, How to integrate this? please help me

Thanks in Advance

I tried this:

- (void)viewDidLoad
{

UIWebView *webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 430, 320, 50)];
[webView setDelegate:self];
NSString *urlAddress = @"http://www.dasfafa./myadds.html";
NSURL *url = [NSURL URLWithString:urlAddress];
NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
[webView loadRequest:requestObj];
[self.view addSubview:webView];
}

-(void)webViewDidStartLoad:(UIWebView *)webView 
{

    [UIApplication sharedApplication].networkActivityIndicatorVisible = YES;
}

-(void)webViewDidFinishLoad:(UIWebView *)webView
{
    [UIApplication sharedApplication].networkActivityIndicatorVisible = NO;
    NSString *currentURL = self.AddvertiseWebView.request.URL.absoluteString;
    NSLog(@"currentURL:%@",currentURL);

}
  • 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-06-10T23:52:25+00:00Added an answer on June 10, 2026 at 11:52 pm

    Here code showing you how to open a link in Safari when clicked on in your UIWebView. The method shouldStartLoadWithRequest is a delegate method that is called when a link is clicked on. You can override the method and tell it to open in Safari.

    - (BOOL)webView:(UIWebView *)webView 
         shouldStartLoadWithRequest:(NSURLRequest *)request
         navigationType:(UIWebViewNavigationType)navigationType; {
    
        NSURL *requestURL = [ [ request URL ] retain ]; 
        // Check to see what protocol/scheme the requested URL is.
        if ( ( [ [ requestURL scheme ] isEqualToString: @"http" ] 
            || [ [ requestURL scheme ] isEqualToString: @"https" ] ) 
            && ( navigationType == UIWebViewNavigationTypeLinkClicked ) ) {
            return ![ [ UIApplication sharedApplication ] openURL: [ requestURL autorelease ] ]; 
        }
        // Auto release 
        [ requestURL release ];
        // If request url is something other than http or https it will open 
        // in UIWebView. You could also check for the other following 
        // protocols: tel, mailto and sms
        return YES;
    }
    

    or Try this

    -(BOOL) webView:(UIWebView *)inWeb shouldStartLoadWithRequest:(NSURLRequest *)inRequest navigationType:(UIWebViewNavigationType)inType {
        if ( inType == UIWebViewNavigationTypeLinkClicked ) {
            [[UIApplication sharedApplication] openURL:[inRequest URL]];
            return NO;
        }
    
        return YES; }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently i am working in iPhone application, Using UITextField to enter phone number, user
i am currently working in iPhone application, using ABPeoplePickerNavigationController to create contact screen in
I have been working with iPhone application in which i am using sqlite database.
I'm working on an iPhone application. I'm using Storyboard. I wanted to have one
I am working on iphone networking application.. I am using asihttp , a wrapper
I'm using OpenGL ES in my iPhone application and sometimes during startup the screen
I'm working on updating an iPhone application with a minor change in its default
I am working on an Iphone application using storyboard. I have a button in
I am working in iPhone application, Using Xcode 4.3.2 tool to develop it, Using
Currently i am working in Android application, In iphone application Using presentModalViewController to animate

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.