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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:56:53+00:00 2026-05-28T01:56:53+00:00

I have a URL rendered as a NSString in my iOS app. Right now

  • 0

I have a URL rendered as a NSString in my iOS app. Right now if the user taps the URL, it will open the webpage in Safari. Is there a way to catch the tap and open it in a UIWebView? I have the UIWebView controller all setup, just need to catch the URL click. Thanks!

Here’s the code that renders the URL right now.

[detailInfoList addObject: [NSDictionary dictionaryWithObjectsAndKeys:
                            [NSNumber numberWithInteger:kCarrierInfo], @"type", 
                            [NSString stringWithFormat:@"http://www.ups.com/track/%@/%@", userPackage.carrier, userPackage.trackingNumber], 
                            @"link", nil]];
  • 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-28T01:56:54+00:00Added an answer on May 28, 2026 at 1:56 am

    Edit: Your URL won’t be caught and passed to UIWebView automatically. You have to put some procedures / methods in place to catch it. Otherwise, it will be handed over to Safari, e.g. links in UITextView.


    You have to pass the URL to the instance of UIWebView. Whether you have sub-classed it as a new ViewController or it is an object within your current viewController, you can set its URL by calling loadRequest method:

    // if it is an object
    [self.webView setLoadRequest:[URLRequest requestWithURL:[NSURL URLWithString:@"http://www.apple.com"]]];
    
    // or if it is subclassed
    self.loadRequest = ... // as mentioned above
    

    You can alternatively, use requestWithURL:(NSURL *)theURL cachePolicy:(NSURLRequestCachePolicy)cachePolicy timeoutInterval:(NSTimeInterval), which I personally prefer, because you can customize it with more options.

    Here are useful links to read:
    http://developer.apple.com/library/ios/#documentation/uikit/reference/UIWebView_Class/Reference/Reference.html

    http://developer.apple.com/library/ios/#documentation/Cocoa/Reference/Foundation/Classes/NSURLRequest_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSURLRequest

    http://developer.apple.com/library/ios/#documentation/Cocoa/Reference/Foundation/Classes/NSURL_Class/Reference/Reference.html#//apple_ref/doc/c_ref/NSURL

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

Sidebar

Related Questions

I have URL scheme for my blog like this: http://www.example.com/%YEAR%/%MONTH%/%CATEGORY%/%POST_TITLE%/ Now i want to
I have a page that is mostly rendered through json data. The url passes
I have a registration form that is rendered by the following urlconf -- url(r'^$',
I have a simple page with a single rendered iFrame. There's a link called
I have a web app that is completely contolled with javascript. This means there
I want to change the display URL of a rendered response object. I have
I have URL like: http://example.com#something , how do I remove #something , without causing
Is it possible in CakePHP to have URL aliases in routes.php? Or by what
I have a URL , and I'm trying to match it to a regular
I have a URL which requires some parameters. The values of those parameters can

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.