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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T06:51:45+00:00 2026-05-26T06:51:45+00:00

I am making an app which has a section for latest company news. Basically

  • 0

I am making an app which has a section for latest company news. Basically the plan was initially to use ASIHTTPRequest to extract all the HTML, search through it for tags then pull the information out for news title and description then display it as just plan text in a scroll view of my app. However, this was proving to be a nightmare as the site has no pattern to the way the information is displayed.

I have since decided to display the URL in a UIWebView which shows the latest company news. I want this to be a one page view so my user cannot navigate to other aspects of the site. Is it possible to stop the sites hyperlinks showing up as links? My code for the UIWebView is as follows;

UIView *webNewsView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
self.view = webNewsView;    

CGRect webFrame = [[UIScreen mainScreen] applicationFrame];
webFrame.origin.y = 0.0f;
webNews = [[UIWebView alloc] initWithFrame:webFrame];
webNews.backgroundColor = [UIColor clearColor];
webNews.scalesPageToFit = YES;
webNews.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
webNews.delegate = self;
[self.view addSubview: webNews];
[webNews loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://myURLHere"]]];

indicator = [[UIActivityIndicatorView alloc]initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleGray];
indicator.frame = CGRectMake(0.0, 0.0, 25.0, 25.0);
indicator.center = self.view.center;
[self.view addSubview: indicator];

Any help would be appreciated.
Thanks

EDIT: I have also tried adding the following;

webNews.dataDetectorTypes = UIDataDetectorTypeNone;

Which makes no difference to the detection of links.

  • 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-26T06:51:45+00:00Added an answer on May 26, 2026 at 6:51 am

    OK, setting the UIDataDetectorTypeNone for dataDetectorTypes, should prevent the webview from detecting the links, this is correct.

    Furthermore using the

    - (BOOL)webView:(UIWebView *)webView shouldStartLoadWithRequest:(NSURLRequest *)request navigationType:(UIWebViewNavigationType)navigationType 
    

    UIWebview delegate, you can simply return NO for the URL’s you don’t want the user to allow following…

    Furthermore, you can insert custom CSS Rules, after the page has finished loading in the

    - (void)webViewDidFinishLoad:(UIWebView *)webView 
    

    delegate method, this way:

    [MywebView stringByEvaluatingJavaScriptFromString:@"document.styleSheets[0].addRule(\"a.link\", \"color:#FF0000\")"];
    

    So based on the CSS from the thread I mentioned, this should work:

    [MywebView stringByEvaluatingJavaScriptFromString:@"document.styleSheets[0].addRule(\".active\", \"pointer-events: none;\");document.styleSheets[0].addRule(\".active\", \"cursor: default;\")"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building an app that has several different sections to it, all of which
I'm making a shopping list app which basically uploads your shopping list to a
I'm making an app which has a flow roughly as below: User starts on
I am making an app which has infinite scrolling while showing its results. I
I am making an iPhone app which has ASCII art. I face a problem
I am making an iPhone app which has a requirement to implement the UIPageControl.
I am making an iPhone app which has its database on the web server.
I am making an iPhone and iPad app, which has a requirement for iAds.
I'm making an app which has a tableview and a DetailViewController. I'm using Apple's
hi all i am making an app which uses gdata apis . i have

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.